Differences between revisions 1 and 23 (spanning 22 versions)
Revision 1 as of 2007-01-20 13:34:54
Size: 1704
Editor: jaromil
Comment:
Revision 23 as of 2007-12-02 03:48:09
Size: 4322
Editor: anonymous
Comment: minor reformatting and various others - tommydrum
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= How to boot DyneBolic from USB = === How to boot DyneBolic from USB ===
The following instructions explain how to make a USB storage device (like a USB key) bootable with the GRUB bootloader and install dyne:bolic on it so that you can run it from USB, without a harddisk or CD.
Line 3: Line 4:
The following instructions explain how to make a usb storage device (like usb stick) bootable
with grub and install dyne:bolic on it so that you can run it from USB, without harddisk or CD.
If you are looking for instructions on how to save your personal data on a USB stick, then please look at ["Nesting"]. If you're looking to copy the entire system over to your harddrive, then please look at ["Docking"]. This page documents on how to put the '''whole system''' on the usb stick.
Line 6: Line 6:
If you are looking for instructions about ["Nesting"], on how to save your personal data on a
USB stick, then this is not the right place. This page documents on how to put the WHOLE SYSTEM
on the usb stick.
The '''whole system''' requires a USB device about the size of the /dyne directory (currently ~655MB at version 2.4.2) + ~30MB (for file system headers). Therefore, the entire system should fit on a USB key of ~685MB, but you may want a bit more space for your personal files. If your USB stick is smaller try ["Nesting"] instead.
Line 10: Line 8:
How dyne:bolic II boots (technical):
Line 11: Line 10:
little briefing:
* the boot system consists of a bootloader, in our case grub
* the bootloader loads a kernel, in our case linux :)
* the kernel loads a ramdisk, in our case dyne:II initrd.gz
* the ramdisk will look for a dyne/ dock
 * The boot system consists of a bootloader, in this case grub
 * The bootloader loads a kernel, in our case linux :)
 * The kernel loads a RAMdisk (a virtual device that resides on RAM memory), in our case initrd.gz
 * The RAMdisk looks for a dyne/ dock
 * Both the kernel and RAMdisk are put in a dock and GRUB is installed.
Line 17: Line 16:
we keep both kernel and ramdisk in a dock and install grub '''Use this tutorial from a running dyne:bolic system,''' it should be nested or running as a liveCd:
Line 19: Line 18:
do the following operations from a running dyne:II DHORUBA 2.3
(i will assume the usb stick is recognized as /dev/sda)
 1. Open a terminal window.
 1. Find what device your USB drive is:
  . {{{
cat /proc/partitions}}}
  * Ignore the entries that end in numbers, those are individual partitions on each separate device. The ones that end in letters are different devices.
  * ''hda'' means your primary IDE harddrive, ''sd...'' generally means a RAID/SCSI/USB device
  * If you're confused, look at the ''blocks'' column, which shows the # of 1KB blocks on the device. If you know how big your USB stick is, you can find it this way. ~1,000,000 blocks = a 1 gigabyte device; ~64,000 blocks = 64MB device.
  * From here on in, this tutorial assumes your usb device is /dev/sda, if it's not /dev/sda, change it accordingly.
 1. Start the partition tool:
  . {{{
cfdisk /dev/sda}}}
   . With cfdisk:
   * delete all partitions
   * create a new primary at maximum size (Don't use the "Maximize" button, it does something very different)
   * put the type to 83 (Linux)
   * write everything and quit
 1. Format your drive:
  . {{{
mke2fs /dev/sda1 }}}
  . Change it to ''mke2fs -j...'' if you want to use EXT3 instead of EXT2. However, it is not advisable to use the EXT3 journaled filesystem on a flash/USB device, because journaling writes to the disk more often than necessary, which wears out the USB device more quickly. Use a non-journaled filesystem such as EXT2 (Linux only) or FAT32 (if you want to make your usb device readable from other OSs, such as Windoze). The default (ext2) is a safe choice, however, you may want to read up on journaled vs non-journaled file systems and make an informed decision in your case.
Line 22: Line 39:
partition the usb stick as a unique FAT32 partition
 (we want people to be able to handle contents from windlows):
* cfdisk /dev/sda
* delete all partitions
* create a new primary at maximum size
* put the type to 0B (W95 FAT32)
* write everything and quit
 1. Mount the drive:
  . {{{
mount /dev/sda1 /mnt/usb }}}
 1. Install grub:
  . {{{
grubconfig}}}
  * Select the usb device, generally the last item in the list.
  . '''Note:''' If all the items in the list start with ''hda...'', the computer you're currently using can't be booted from a usb device and you'd be installing grub to a partition of your harddrive instead. Quit, then find another computer.
 1. Copy the dyne/ dock directory from the CD
  . {{{
rsync -Pr /mnt/cd1/dyne /mnt/usb/}}}
  . (rsync is better than cp and we have a progressbar)
 1. Try booting your USB device. If it works, great! If not:
  * Open your /boot/grub/menu.lst (on the USB device) and change the root(...) line from (hd0,0) to (hd1,0). Save the old line as a comment.
  * There is an alternate set of boot options in /dyne/menu.lst, which selects a different kernel (use if it complains how it can't mount the drive), and replace the kernel line. Save the old line as a comment. (Try this with the default root line and the alternate)
Your USB device is ready!
Line 30: Line 56:
then format it with
* mkdosfs -n "dyne:II" /dev/sda1

mount it with
* mount /dev/sda1 /mnt/usb

then install grub using
* grubconfig
 (select the last in the list and proceed)

copy the dyne/ dock directory from the CD
 (rsync is better than cp and we have a progressbar)
* rsync -Pr /mnt/cd1/dyne /mnt/usb/


and at this point we are ready :)

inside the boot/grub/menu.lst there are the default options to boot,
they should work alltough some times they might need (hd0,0) to be
changed to (hd1,0) depending on how the computer sees the usb...
'''Note:''' This does not seem to work if your USB device is ''sdb...'' (ie, on a system with a RAID hd), the usb device is never loaded into /boot/volumes, so the system complains about not having a dyne system to boot from. If you put the CD in, it works fine.

How to boot DyneBolic from USB

The following instructions explain how to make a USB storage device (like a USB key) bootable with the GRUB bootloader and install dyne:bolic on it so that you can run it from USB, without a harddisk or CD.

If you are looking for instructions on how to save your personal data on a USB stick, then please look at ["Nesting"]. If you're looking to copy the entire system over to your harddrive, then please look at ["Docking"]. This page documents on how to put the whole system on the usb stick.

The whole system requires a USB device about the size of the /dyne directory (currently ~655MB at version 2.4.2) + ~30MB (for file system headers). Therefore, the entire system should fit on a USB key of ~685MB, but you may want a bit more space for your personal files. If your USB stick is smaller try ["Nesting"] instead.

How dyne:bolic II boots (technical):

  • The boot system consists of a bootloader, in this case grub
  • The bootloader loads a kernel, in our case linux :)

  • The kernel loads a RAMdisk (a virtual device that resides on RAM memory), in our case initrd.gz
  • The RAMdisk looks for a dyne/ dock
  • Both the kernel and RAMdisk are put in a dock and GRUB is installed.

Use this tutorial from a running dyne:bolic system, it should be nested or running as a liveCd:

  1. Open a terminal window.
  2. Find what device your USB drive is:
    • cat /proc/partitions
    • Ignore the entries that end in numbers, those are individual partitions on each separate device. The ones that end in letters are different devices.
    • hda means your primary IDE harddrive, sd... generally means a RAID/SCSI/USB device

    • If you're confused, look at the blocks column, which shows the # of 1KB blocks on the device. If you know how big your USB stick is, you can find it this way. ~1,000,000 blocks = a 1 gigabyte device; ~64,000 blocks = 64MB device.

    • From here on in, this tutorial assumes your usb device is /dev/sda, if it's not /dev/sda, change it accordingly.
  3. Start the partition tool:
    • cfdisk /dev/sda
      • With cfdisk:
      • delete all partitions
      • create a new primary at maximum size (Don't use the "Maximize" button, it does something very different)
      • put the type to 83 (Linux)
      • write everything and quit
  4. Format your drive:
    • mke2fs /dev/sda1 
    • Change it to mke2fs -j... if you want to use EXT3 instead of EXT2. However, it is not advisable to use the EXT3 journaled filesystem on a flash/USB device, because journaling writes to the disk more often than necessary, which wears out the USB device more quickly. Use a non-journaled filesystem such as EXT2 (Linux only) or FAT32 (if you want to make your usb device readable from other OSs, such as Windoze). The default (ext2) is a safe choice, however, you may want to read up on journaled vs non-journaled file systems and make an informed decision in your case.

  5. Mount the drive:
    • mount /dev/sda1 /mnt/usb 
  6. Install grub:
    • grubconfig
    • Select the usb device, generally the last item in the list.
    • Note: If all the items in the list start with hda..., the computer you're currently using can't be booted from a usb device and you'd be installing grub to a partition of your harddrive instead. Quit, then find another computer.

  7. Copy the dyne/ dock directory from the CD
    • rsync -Pr /mnt/cd1/dyne /mnt/usb/
    • (rsync is better than cp and we have a progressbar)
  8. Try booting your USB device. If it works, great! If not:
    • Open your /boot/grub/menu.lst (on the USB device) and change the root(...) line from (hd0,0) to (hd1,0). Save the old line as a comment.
    • There is an alternate set of boot options in /dyne/menu.lst, which selects a different kernel (use if it complains how it can't mount the drive), and replace the kernel line. Save the old line as a comment. (Try this with the default root line and the alternate)

Your USB device is ready!

Note: This does not seem to work if your USB device is sdb... (ie, on a system with a RAID hd), the usb device is never loaded into /boot/volumes, so the system complains about not having a dyne system to boot from. If you put the CD in, it works fine.

DyneOnUsb (last edited 2011-07-08 18:07:40 by 0v0x)