Grub problem

Greg Newton greg.newton at optusnet.com.au
Mon Jan 24 14:23:58 PST 2005


I beg to differ.

When /boot and / are in separate partitions, your kernel should
have the root argument pointing to the "/" partition, and GRUB
should have ITS root argument pointing at the "/boot" partition.
Keeping it simple, with two partitions on hda. hda1 = /boot,
hda2 = /
grub:
root (hd0,1)  # tells grub where to find menu.lst
setup (hd0)   # installs grub in MBR of hda

Note: doing 'setup' without the 'root' command will not achieve
the desired result.

menu.lst:
title xxxxxx 2.6.7 - hda2
kernel (hd0,1)/boot/vmlinuz-2.6.7 root=/dev/hda2

and of course in fstab

/dev/hda2 /  
/dev/hda1 /boot 

http://www.gnu.org/software/grub/manual/

/greg

>--- Original Message ---
>From: "Poonchezhian P." <pchez at mail.cyberneme.com>
>To: LFS Support List <lfs-support at linuxfromscratch.org>
>Date: 1/24/05 8:28:14 PM
>
When /boot and / are in separate partitions, your kernel should
have the root 
>argument pointing to the "/boot" partition. For example, if
your /boot is 
>located in /dev/hda1, your kernel argument for root should be

>"root=/dev/hda1".
>
>BTB, What is the base OS you use for building your lfs ???
>
>On Monday 24 January 2005 3:21 pm, Bluesheet wrote:
>> Dear Shelton,
>>
>> Yes, I also try this method, but the content of the /boot
is not the
>> content of original /dev/hda1, when the system start, it will
use the
>> default /boot inside the /, and execute the /etc/fstab, then
it will mount
>> the /dev/hda1 into /boot and overwrite the original /boot.
>>
>> The other question is, why the GRUB menu didn't execute when
/boot and /
>> partition are separated.
>>
>> Sorry that, my english is not good, if have some misunderstand
please
>> forgive me.
>> Thanks.
>>
>>
>> "Shelton" <shelton at onr.com> wrote in message
>> news:41F4B3C6.7020807 at onr.com...
>>
>> > Bluesheet wrote:
>> > > Dear all,
>> > > I have a question about GRUB.
>> > > I found a funny problem with GRUB.
>> > > when I install linux and make a 100MB partition for "/boot(/dev/hda1)",
>>
>> when
>>
>> > > the system install GRUB, it will ask me for the location
of GRUB.
>> > > Mostly
>>
>> it
>>
>> > > have two location, "/dev/hda(MBR)" and "/dev/hda1".The
problem is to
>>
>> choose
>>
>> > > which location is correct?
>> > > when I choose to install in "/dev/hda(MBR)", after that,
the system
>> > > will startup without errors, and when I use "mount" to
show the mount
>> > > point
>>
>> of
>>
>> > > the system, the system didn't mount "/dev/hda1(/boot)",
and the
>>
>> /etc/fstab
>>
>> > > will not have "/dev/hda1(/boot)" information on it; and
the /boot will
>> > > existed inside the "/", so the partition "/dev/hda1" will
empty and
>>
>> didn't
>>
>> > > use for the system.
>> > > But when I change the location to "/boot(/dev/hda1)" the
system will
>>
>> have a
>>
>> > > grub problem when the grub start, it didn't show the GRUB
menu, it only
>>
>> run
>>
>> > > the grub command line, when I type...
>> > > grub>root (hd0,0)
>> > > grub>kernel /vmlinuz ro root=/dev/hda2
>> > > grub>boot
>> > > the system will startup, after the system start, I use
"mount" to show
>>
>> the
>>
>> > > mount point of the system, it will exists "/dev/hda1(/boot)"
and the
>> > > "/dev/hda1" will correctly mount into the system, but
the main problem
>>
>> is
>>
>> > > the GRUB didn't show the menu? the /grub/grub.conf and
/etc/fstab are
>> > > correct, why?
>> > > Is I missing sth when I install GRUB?
>> > >
>> > > Here I make a summary of my question
>> > > Making 100MB partition for /boot and install GRUB.
>> > > Grub install in "/dev/hda(MBR)", the system didn't mount
and use
>> > > /dev/hda1(/boot), it's empty, the system will make a new
/boot
>> > > partition inside "/".
>> > > Grub install in "/dev/hda1(/boot)", the system didn't
load the GRUB
>>
>> menu, it
>>
>> > > must to use command mode to startup the system, and "/dev/hda1(/boot)"
>>
>> it
>>
>> > > will used by the system.
>> > >
>> > > Thanks. Please give me some suggestions. ^_^
>> >
>> > this is similar to my setup.
>> >
>> > add a line to /etc/fstab describing your /boot partition.
>> > example
>> > /dev/hda1 /boot ext3 defaults 1 2
>> > then install grub to the MBR of /dev/hda
>> >
>> > fstab is not a dynamic file.
>> > partitions and their mount points must be manually added
to /etc/fstab
>> >
>> > hope this helps.
>> > ~shelton
>
>-- 
>Poonchezhian P.
>Team Leader - Infrastructure
>Odyssey Technologies Limited,
>A-1, 5th Floor, Parsn Manere,
>602, Anna Salai, Chennai - 600 006
>Ph : 28221330, 28233495, 28222455
>Email : pchez at mail.cyberneme.com
>-- 
>http://linuxfromscratch.org/mailman/listinfo/lfs-support
>FAQ: http://www.linuxfromscratch.org/lfs/faq.html
>Unsubscribe: See the above information pag





More information about the lfs-support mailing list