source: livecd/trunk/isoroot/README.usbstick @ 2107

Revision 2107, 2.5 KB checked in by grimmlin, 16 months ago (diff)

isoroot: Updated usbstick howto for grub

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