| 1 | Mini-Pentoo HowTo usbstick. |
|---|
| 2 | |
|---|
| 3 | To write this iso image to a usbstick is simple. Let's see: |
|---|
| 4 | |
|---|
| 5 | Create a bootable Linux partition on your USB pen drive. |
|---|
| 6 | ie /dev/sdc1 with fdisk like the following sentence |
|---|
| 7 | (Watch out, it will suppress all data...) |
|---|
| 8 | fdisk /dev/sdc |
|---|
| 9 | d (delete the partitions you might have) |
|---|
| 10 | n (new) |
|---|
| 11 | p (primary) |
|---|
| 12 | 1 (number 1) |
|---|
| 13 | Choose the size you want... |
|---|
| 14 | a (bootable flag) |
|---|
| 15 | 1 (number 1) |
|---|
| 16 | Do it the size you want 1 GB is enough, the whole is better |
|---|
| 17 | w (write) |
|---|
| 18 | |
|---|
| 19 | Format is Ext2 filesystem. Be sure to use the correct partition!!! |
|---|
| 20 | mkfs.ext2 /dev/sdc1 |
|---|
| 21 | |
|---|
| 22 | Put the file mbr.bin on the whole filesystem ie sdc without partition number: |
|---|
| 23 | cat tools/usbboot/mbr.bin > /dev/sdc |
|---|
| 24 | This file resides in the iso/cd in tools/usbboot/ and will put a MBR on the |
|---|
| 25 | stick, allowing it to be bootable for the BIOS. |
|---|
| 26 | |
|---|
| 27 | Mount it on /mnt/stick: |
|---|
| 28 | mkdir /mnt/stick |
|---|
| 29 | mount /dev/sdc1 /mnt/stick |
|---|
| 30 | |
|---|
| 31 | Copy all files from the cdrom on /mnt/stick. |
|---|
| 32 | rsync -av --progress /mnt/cdrom/* /mnt/stick/ |
|---|
| 33 | |
|---|
| 34 | Then you have 2 choices, either use extlinux or grub. |
|---|
| 35 | Grub is now the recommended default so try that first. |
|---|
| 36 | |
|---|
| 37 | GRUB BOOT 2010.0 and onwards : |
|---|
| 38 | --------- |
|---|
| 39 | |
|---|
| 40 | Verify that you have all the needed grub stages on the stick |
|---|
| 41 | ls /mnt/stick/boot/grub/ |
|---|
| 42 | You need menu.lst that will correspond to the grub boot menu. |
|---|
| 43 | It should be there already if you're using >=2010.0 |
|---|
| 44 | copy all the grub stage to there: |
|---|
| 45 | /* this will be fixed in 2011.0 */ |
|---|
| 46 | mount /boot |
|---|
| 47 | cp /boot/grub/stage* /mnt/stick/boot/grub/ |
|---|
| 48 | Then install grub on the mbr |
|---|
| 49 | grub |
|---|
| 50 | grub> root (hd |
|---|
| 51 | Possible disks are: hd0 hd1 |
|---|
| 52 | /* Here you can guess with tab-completion what drive number is your stick */ |
|---|
| 53 | /* You must point to the partition where grub is installed. in this case (hd2,0)/sdc1 */ |
|---|
| 54 | grub> root (hd2,0) |
|---|
| 55 | Filesystem type is ext2fs, partition type 0x83 |
|---|
| 56 | |
|---|
| 57 | grub> setup (hd2) |
|---|
| 58 | Checking if "/boot/grub/stage1" exists... yes |
|---|
| 59 | Checking if "/boot/grub/stage2" exists... yes |
|---|
| 60 | Checking if "/boot/grub/e2fs_stage1_5" exists... yes |
|---|
| 61 | Running "embed /boot/grub/e2fs_stage1_5 (hd2)"... 20 sectors are embedded. |
|---|
| 62 | succeeded |
|---|
| 63 | Running "install /boot/grub/stage1 (hd2) (hd2)1+20 p (hd2,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded |
|---|
| 64 | Done. |
|---|
| 65 | |
|---|
| 66 | grub> |
|---|
| 67 | |
|---|
| 68 | You're all set, reboot and enjoy |
|---|
| 69 | |
|---|
| 70 | EXTLINUX BOOT 2009.0 and backwards: |
|---|
| 71 | ------------- |
|---|
| 72 | Go in /mnt/stick/isolinux/ |
|---|
| 73 | Move isolinux.cfg to extlinux.conf |
|---|
| 74 | You can eventually edit it to pass wanted arguments, like keymap=43 and remove dokeymap, xres=1024x768 or so |
|---|
| 75 | |
|---|
| 76 | Use extlinux to write the bootloader on the stick : |
|---|
| 77 | extlinux -i /mnt/stick/isolinux/ |
|---|
| 78 | |
|---|
| 79 | If you don't have extlinux, use the static binary provided |
|---|
| 80 | under tools/usbboot/extlinux |
|---|
| 81 | |
|---|
| 82 | You're done. Hope you'll enjoy it. |
|---|
| 83 | |
|---|