[pocket-linux] GRUB loader for read/write in Chapter 4

David Horton dhorton at speakeasy.net
Fri Mar 19 14:23:20 CST 2004


> -----Original Message-----
> From: James Maki [mailto:jwmaki at att.net]
> Sent: Friday, March 19, 2004 08:06 PM
> To: 'Support for Pocket Linux Guide'
> Subject: RE: [pocket-linux] GRUB loader for read/write in Chapter 4
> 
> > -----Original Message-----
> > From: pocket-linux-bounces at ufo.chicago.il.us
> > [mailto:pocket-linux-bounces at ufo.chicago.il.us]On Behalf Of David Horton
> > Sent: Friday, March 19, 2004 11:13 AM
> > To: Support for Pocket Linux Guide
> > Subject: Re: [pocket-linux] GRUB loader for read/write in Chapter 4
> >
> >
> > > -----Original Message-----
> > > From: James Maki [mailto:jwmaki at att.net]
> > >
> > > I have progressed to Chapter 4, and with a few tweaks and
> > re-do's, it boots.
> > > BUT, I do not have write ability as the chapter 4.4
> > implementation examples
> > > indicate. I am sure the problem is with grub. This is my grub.conf file:
> > >
> > > # /boot/grub/grub.conf  -  GRUB configuration file for Pocket Linux
> > > color=light-gray/blue black/light-gray
> > > #
> > > # The following is for Chapter 2 & 3 boot disk
> > > # title=bootdisk (Test Boot Disk Configuration)
> > > #     kernel (fd0)/boot/vmlinuz  root=/dev/fd0  mount=read-only \
> > > #     vga=normal init=/bin/sh  load_ramdisk=1  prompt_ramdisk=1
> > > #
> > > # Chapter 4 boot disk without mount=read-only
> > >  title=bootdisk (Test Boot Disk Configuration WRITE ENABLED?)
> > >     kernel (fd0)/boot/vmlinuz  root=/dev/fd0 mount=read-write \
> > >     vga=normal init=/bin/sh  load_ramdisk=1  prompt_ramdisk=1
> > > #
> > > # End of configuration file
> > >
> > > I also tried to just remove the mount=read-only from the
> > > Chapter 2&3 boot
> > > disk configuration file, but that did not work. I am a linux
> > > and grub novice
> > > so any pointers would be helpful. I have searched google and the man and
> > > info pages for grub with no success. I am hoping this is a simple fix.
> > >
> > > Thanks,
> > >
> > > Jim Maki
> > > jwmaki at att.net
> > >
> >
> > Here's a little LILO to GRUB translation trick.  Where the LILO
> > instructions say:
> >
> > 'At the LILO prompt, type bootdisk rw init=/bin/sh'
> >
> > Take anything after the word 'bootdisk' and put it after
> > 'vmlinuz' on the 'kernel' line in GRUB's config file like this:
> >
> > kernel (fd0)/boot/vmlinuz rw init=/bin/sh
> >
> > Then be sure to include the 'load_ramdisk=1' and
> > 'prompt_ramdisk=1' parameters since we're using a compressed root
> > disk.  Your final line should look like this:
> >
> > kernel (fd0)/boot/vmlinuz rw init=/bin/sh load_ramdisk=1 prompt_ramdisk=1
> >
> > The only difference between this and the grub.conf file you
> > listed above is the 'vga=normal' and 'mount=read-write'
> > parameters.  This should be okay because I think 'vga=normal' is
> > a default setting and 'mount=read-write' is probably synonymous
> > with 'rw'.  I am not absolutely sure about the 'rw' equal to
> > 'mount=read-write' thing so you may want to double-check that.
> >
> > Good Luck,
> > Dave
> 
> 
> Dave,
> 
> Thanks for the pointers. I got everything to work but not exactly as you
> indicated. Replacing mount=read-only with rw did the trick. I also needed to
> add the root=/dev/fd0 parameter to the line you sent.  The complete
> grub.conf that I used and worked is below.
> 
> # /boot/grub/grub.conf  -  GRUB configuration file for Pocket Linux
> color=light-gray/blue black/light-gray
> #
> # The following is for Chapter 2 & 3 root disk
> # title=bootdisk (Test Boot Disk Configuration)
> #     kernel (fd0)/boot/vmlinuz  root=/dev/fd0  mount=read-only \
> #     vga=normal init=/bin/sh  load_ramdisk=1  prompt_ramdisk=1
> #
> # Chapter 4 root disk with write enabled
>  title=bootdisk (Test Boot Disk Configuration WRITE ENABLED! Dave Horton
> Suggestions!)
>     kernel (fd0)/boot/vmlinuz root=/dev/fd0 rw \
>     vga=normal init=/bin/sh  load_ramdisk=1  prompt_ramdisk=1
> #
> # End of configuration file
> 
> I did have one other problem/question. When I entered hostname $(cat
> /etc/hostname) at the bash prompt (as per the instructions from chapter 4
> implementation), I get an error message: hostname: too many arguments. The
> other write and make directory commands seem to work as advertised. Again,
> thanks for the assistance.
> 
> Jim Maki
> jwmaki at att.net
> 
> 

Good catch on the root=/dev/fd0.  That is an essential parameter.  As far as the hostname question check the line above that reads:

'echo "PocketLinux" > /etc/hostname'

Make sure there are no spaces in 'PocketLinux'.  Typing 'Pocket Linux' as two words might cause the "too many arguments" error.

Dave






More information about the Pocket-Linux mailing list