grub menu.lst for usb flash card

Using applications, configuring, problems
Post Reply
Message
Author
smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

grub menu.lst for usb flash card

#1 Post by smog »

Please can someone give me a working menu.lst suggestion for an external usb flash card?

I want to install multiple Puppys on a flash drive.

I have tried installing with the grub installer and get:

title Puppy4 (on /dev/sdc1)
root (hd2,0)
kernel /boot/puppy/q1/vmlinuz root=/dev/sdc1 PMEDIA=usbflash ro vga=791
initrd /boot/puppy/q1/initrd.gz

I have put my Puppy files in /boot/puppy/q1 on the drive

But all i get is error 25: Disk read error

Any ideas? I have tried the forums but nothing seems to suggest the above is wrong. (The drive is confirmed as sdc1)

thanks

smog

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

Is this flash drive meant to be bootable? If so, your BIOS will report it to GRUB as (hd0,0). So the appropriate menu.lst entry is:

Code: Select all

title Puppy4 (on USB)
root (hd0,0)
kernel /boot/puppy/q1/vmlinuz 1 pmedia=usbflash 
initrd /boot/puppy/q1/initrd.gz 
Unfortunately, Puppy's hardware detection may not be able to drill that far down into the directory structure to find its files. You would be better off using a simpler structure like:

Code: Select all

title Puppy4 (on USB)
root (hd0,0)
kernel /pup412/vmlinuz pmedia=usbflash 
initrd /pup412/initrd.gz 

smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

#3 Post by smog »

Hi thanks. this:

title Puppy4 (on USB)
root (hd0,0)
kernel /q1/vmlinuz pmedia=usbflash vga=791
initrd /q1/initrd.gz


gets the first few lines of the boot process going but then just goes to a black screen and nothing happens.

Any thoughts?

smog

smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

#4 Post by smog »

SORRY

removed vga=791 and it works like a charm

Thanks very much

smog

User avatar
T_Hobbit
Posts: 400
Joined: Sat 27 May 2006, 10:50
Location: Portugal - Lisbon

#5 Post by T_Hobbit »

I used TinyCoreLinux to make a quad-bootable USB pen drive:

default vesamenu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label BoxPup412
kernel /boxpup/vmlinuz
append initrd=/boxpup/initrd.gz pmedia=usbflash nosmp quiet psubdir=boxpup

label ubnentry2
menu label MacPup412_E17
kernel /macpup_e17/vmlinuz
append initrd=/macpup_e17/initrd.gz pmedia=usbflash nosmp quiet psubdir=macpup_e17

label ubnentry0
menu label tinycore@home
kernel /boot/bzImage
append initrd=/boot/tinycore.gz waitusb=10 tce=sdb1 quiet

label ubnentry1
menu label tinycore@lenovo
kernel /boot/bzImage
append initrd=/boot/tinycore.gz waitusb=10 tce=sda1 quiet
T_Hobbit
:idea: Rebuilding old DOS Machine for Wing Commander Privateer and Puppy :!: Old spare parts to give away - anyone interested :?:

smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

#6 Post by smog »

OK thanks very much.

Is it now possible to put something in my hard drive menu.lst to boot direct to the flash drive GRUB (that now works) rather than having to change my BIOS to boot from the flash drive?

thanks

smog

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#7 Post by rcrsn51 »

When you first set up GRUB on the flash drive, you would have used some commands like:

Code: Select all

grub
root (hd1,0)
setup (hd1)
quit
These commands installed GRUB's stage1 code on the MBR of the flash drive. However, you can also put stage1 on the drive's partition boot sector. Use these commands:

Code: Select all

grub
root (hd1,0)
setup (hd1,0)
quit
The drive will still boot as before when you select it from your BIOS.

Now go into your hard drive's menu.lst and add this entry.

Code: Select all

Puppy on USB
root (hd1,0)
chainloader +1
All of the above assumes that you only have one main hard drive and your BIOS is detecting the USB device as the second drive.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#8 Post by Dougal »

smog wrote:removed vga=791 and it works like a charm
That option should probably be disabled in grubconfig, as those modes most likely need the framebuffer modules to be built into the kernel...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

#9 Post by smog »

thanks rcrsn51

i am not sure what you mean in that first bit, do i need to install grub on my flash drive to a partition (/dev/sd?1) on the drive as well as its mbr

i tried my harddisk grub with your suggestion and got an executable error so i guess i need to do something else

thanks

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

do i need to install grub on my flash drive to a partition (/dev/sd?1) on the drive as well as its mbr
Yes. If you are using the GRUB bootloader config program from the System menu, install it to the partition's superblock.

smog
Posts: 134
Joined: Tue 13 Jun 2006, 12:52

#11 Post by smog »

Thanks for the help

That's working fine

smog

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

Glad to help.

Post Reply