Author Topic: Install From A USB Key?  (Read 8423 times)

jabster

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Install From A USB Key?
« on: June 02, 2009, 06:04:29 pm »
Hi.

Is it possible to install ebox from a USB key? I can do it with Mandriva, but need to do it with an ebox machine as well. Do I need a specific boot image for ebox?

I have no more blank CDs, and don't plan on buying any more. My main reason for having blank CD was for linux installs, but now that I can do it with a USB key why buy more? :-)

thanks,
john

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #1 on: June 03, 2009, 03:18:51 pm »
best I found on the topic:
Creating the First USB Source Stick

We could skip this first step if we have a working USB CD drive. Ours wasnt recognized by our motherboard. If you do have a CD drive, burn an ISO image of Ubuntu Server 8.04.1 and boot with that. You can then skip to the next major step: "Creating the Second USB Target Stick". You should probably use 8.04.2 now that it is out, so if you want, adjust this accordingly, but it was written for 8.04.1.

Using an external Linux computer, attach the first USB key.
Then run from the command line:


sudo fdisk -l


To find your USB device name. Should be “sdb” or something. We will use “sdx” for our purposes, replace with the appropriate device name.


Format the first USB stick:


sudo umount /dev/sdx1
sudo fdisk /dev/sdx
* type p to show the existing partition and d to delete it
* type p again to show any remaining partitions
(if partitions exist, repeat the previous step)
* type n to make a new partition
* type p for primary partition
o type 1 to make this the first partition
o hit enter to use the default 1st cylinder
o type +1G to set the partition size
o type a to make this partition active
o type 1 to select partition 1
o type t to change the partition filesystem
o type 6 to select the fat16 file
* type w to write the new partition table
sudo umount /dev/sdx1
sudo mkfs -t vfat /dev/sdx1


Create a directory for this install and download the proper files:


mkdir usbboot
cd usbboot
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/initrd.gz
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/vmlinuz


You will have to download the ISO image (ubuntu-8.04.1-server-i386.iso). Copy the ISO image to "usbboot"

Make a bootable Linux server install.

This will be our source USB to create a target USB stick. It cannot be used as an actual server.


sudo mkdir -p /mnt/flash
sudo mount -t vfat /dev/sdx1 /mnt/flash
sudo syslinux -s /dev/sdx1
sudo mkdir -p /mnt/iso
sudo mount -o loop ubuntu-8.04.1-server-i386.iso /mnt/iso
sudo cp -R /mnt/iso/isolinux/* /mnt/flash
sudo mv /mnt/flash/isolinux.cfg /mnt/flash/syslinux.cfg
sudo mkdir -p /mnt/flash/install
sudo cp vmlinuz /mnt/flash/install
sudo cp initrd.gz /mnt/flash/install
sudo cp ubuntu-8.04.1-server-i386.iso /mnt/flash
sudo install-mbr /dev/sdx
sudo umount /mnt/flash
sudo umount /mnt/iso


You will now have a bootable USB key. The image can potentially be replaced with another Linux ISO, although you will need the right vmlinuz and initrd files for your distribution.

You will need to set the computer BIOS to allow for USB HD boot, and make sure the USB HD boot has proper priority.

You will then be able to install Ubuntu Server onto a hard drive or another USB key. Again, if you have a CDROM drive you don't need this guide.

abgar

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #2 on: June 03, 2009, 05:04:12 pm »
You can try to use this utility: http://unetbootin.sourceforge.net/ as Ebox is based on Ubuntu  8.04 it should work
« Last Edit: June 03, 2009, 05:43:05 pm by abgar »

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #3 on: June 03, 2009, 09:23:50 pm »
from my experience, there is aboslutely NO way to install from USB. Even if you are able to follow the above instructions, and the installation completes up to a reboot, the rebooted system cannot find the USB as it asks for CD. That is for  ebox install .. I will try now installing 8.04 Kubuntu and installing the packages from apt. God bless my work...
« Last Edit: June 03, 2009, 09:41:36 pm by xorred »

jabster

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #4 on: June 03, 2009, 09:35:15 pm »
from my experience, there is aboslutely NO way to install from USB. Even if you are able to follow the above instructions, and the installation completes up to a reboot, the rebooted system cannot find the USB as it asks for USB.

Are you talking about ebox or ubuntu specifically? 'Cause I was planning on trying this tomorrow.

-john

Sam Graf

  • Guest
Re: Install From A USB Key?
« Reply #5 on: June 03, 2009, 10:05:59 pm »
I think xorred is talking about the reboot step immediately after Ubuntu server is installed, just prior to eBox installation. After Ubuntu server reboot the system looks for a CD to continue the installation from.

abgar

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #6 on: June 03, 2009, 11:18:31 pm »
Here You can find massive information about playing with sticks  ;) http://www.pendrivelinux.com/

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #7 on: June 03, 2009, 11:48:41 pm »
Installing Ubuntu 8.04 to your server (ubuntu LIVE, not Server) and then installing ebox worked for me... Not the best solution, but... still one. Until the devs wake up and realise that most servers don't have a CD drive and that installing via network OR USB is the only option. This is a Server OS, for God's SAKE!

jabster

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #8 on: June 04, 2009, 12:11:49 am »
I think xorred is talking about the reboot step immediately after Ubuntu server is installed, just prior to eBox installation. After Ubuntu server reboot the system looks for a CD to continue the installation from.

Gah. That sucks.

I should be able to install ubuntulive via a usb stick tho, right?

igor_ko

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #9 on: June 04, 2009, 01:11:05 am »
i have problem with old  PC bios boot usb....
http://www.plop.at/en/bootmanager.html#runcd
Run boot from CD or from Floppy

xorred

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #10 on: August 12, 2009, 03:27:19 pm »
so what, nobody found a way to install from usb yet?

that sucks.

andudi

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Install From A USB Key?
« Reply #11 on: December 06, 2009, 10:45:37 pm »
hy folk
thanks for the tipps in this thread, I found now how to install ebox with an usb flash disk.
1) I suppose it should work as well as describe from xorred above!
2) I first tried to copy content of the (loop mounted) iso to the flash disk, but like that I have the problem that the cdrom is not found from the installer.
3) I wrote my own howto, that is even simpler because not using the graphical boot menu:

# *** howto install an ubuntu iso image with an usb flash disk ***
# general infos:
#   https://help.ubuntu.com/9.04/installation-guide/i386/boot-usb-files.html#id2666413
#   http://forum.ebox-platform.com/index.php?topic=1428.0
exit 0

# for those not being root, or feel free to apply 'sudo' at each command :-)
sudo su -

# define device of usb flash disk
DRIVE=sdb
PART=2

# prepare usb flash disk
fdisk /dev/$DRIVE
# create a partition that it looks like:
# /dev/sdb2   *         801        1024      847168    6  FAT16

# create filesystem and install bootloader
mkfs.vfat /dev/$DRIVE$PART
syslinux -s /dev/$DRIVE$PART
install-mbr /dev/$DRIVE # maybe not needed

#  mount and enter usb flash disk
mount /dev/$DRIVE$PART /mnt
cd /mnt

# download an iso image -- e.g. newest ebox
wget http://downloads.sourceforge.net/project/ebox-platform/ebox_installer-1.3.10-2.iso

# download starter kernel and initrd -- for ebox use the corresponding hardy kernel:
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/vmlinuz
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/initrd.gz

# create config file: (the 'file=...' part is from isolinux/isolinux.cfg in the iso image)
echo "default vmlinuz" > syslinux.cfg
echo "append initrd=initrd.gz file=/cdrom/preseed/ubuntu-server.seed" >> syslinux.cfg

# finish
umount /mnt

# while booting from the usb stick, just press Enter at the "boot:" prompt
****************************************************************

this howto works fine for me... I hope I have no typo errors in it!

good luck