boot and now chroot problem

steve huskey iccaros at comcast.net
Sun Jan 11 15:47:16 PST 2004


Kevin Alm wrote:

>----- Original Message -----
>From: "steve huskey" <iccaros at comcast.net>
>To: "LFS Support List" <lfs-support at linuxfromscratch.org>
>Sent: Sunday, January 11, 2004 3:06 PM
>Subject: Re: boot and now chroot problem
>
>
>  
>
>>On Sun, 2004-01-11 at 14:04, Kevin Alm wrote:
>>    
>>
>>>>Snip!
>>>>        
>>>>
>>>Your grub menu is seriosly messed up. You need an entry something like
>>>      
>>>
>this:
>  
>
>>>title LFS boot
>>>root hd(0,2)   (this needs to point to the partition that menu.lst, the
>>>stage files and the rest of your grub files reside)
>>>kernel hd(0,2)/boot/<kernelname> ro root=hde2 (and any other kernel boot
>>>parameters you need)
>>>
>>>
>>>If you are using the host distros grub to boot then change the
>>>root hd(0,2) accordingly. On your system the equivalences should be:
>>>
>>>hd(0,0)  = hde1
>>>hd(0,1)  = hde2
>>>hd(0,2)  = hde3
>>>      
>>>
>>Thanks. (I tried all of these already thats how I found (hd1,1) is that
>>drive and partition).
>> but hd(0,0) is hda not hde, but I understand what you meant. my fedora
>>system boots fine (hd0,0) with this an my last lfs 4.0 was on hde (same
>>partition). since hde is my second hard drive hdc and hdd are both
>>cdroms and grub sees this as (hd1,1) as hde2 (hd1,1) hde3 would be
>>(hd1,2) and hde1 would be (hd1,0)
>>..
>>it boots the kernel it stops and says no init found please pass init. if
>>I think its my soft links but I can't even chroot in to fix them.
>>
>>I really appreciate the help
>>but I've already checked that as a possibility.
>>
>># grub.conf generated by anaconda
>>#
>># Note that you do not have to rerun grub after making changes to this
>>file
>># NOTICE:  You have a /boot partition.  This means that
>>#          all kernel and initrd paths are relative to /boot/, eg.
>>#          root (hd0,0)
>>#          kernel /vmlinuz-version ro root=/dev/hda3
>>#          initrd /initrd-version.img
>>#boot=/dev/hda
>>default=0
>>timeout=10
>>splashimage=(hd0,0)/grub/splash.xpm.gz
>>title Fedora Core (2.4.22-1.2129.nptl)
>>        root (hd0,0)
>>        kernel /vmlinuz-2.4.22-1.2129.nptl ro root=LABEL=/ hdd=ide-scsi
>>rhgb
>>        initrd /initrd-2.4.22-1.2129.nptl.img
>>title steve kernel (2.4 LFS-5.0-CORE) # this is my LFS kernel
>>        root (hd1,1)   # hd1,1 is the second hard drive in the system
>>        kernel /boot/lfskernel  ro  # maybe this should have a
>>root=/dev/hde2
>>title (2.6)
>>        root (hd0,0)
>>        kernel /bzImage
>>    
>>
>
>Yes, you need a root=/hde2 in the kernel line. Without it the kernel doesn't
>know what to mount as /.
>It's a good idea to explicitly state the full path to the kernel as below.
>One important gotcha coming off of a rh system, make sure all boot necessary
>modules are complied into the kernel (for example ext3) Rh is in love with
>initrd images and if you used your rh kernel config you could be in trouble.
>
>kernel hd(1,1)/boot/lfskernel ro root=hde2
>
>I gather you understand that grub searches through the sequence hda, hdb,
>hdc, etc and assigns hd numbers to hard drives, hence your hde = hd1 .
>
>  
>
thanks I tried to add hd(1,1) and (hd1,1) buy both did not work .. at 
this point I thinnk I screwed up my soft links by copying the files off 
the drive reformatting than recopying them. I should of tar.gz or bz 
whichever and then they should of kept there links.. when I mount the 
drive and then chroot to it I get /bin/bash file or directory does not 
exist.
Im sorry if I sound short , your segestion did lead to at least 3 new 
things I did not try before. I'm just a little mad after spending 2 
strait days compiling and then have it all distroyed by a little 
mistake. I was doing so well no compiling errors just too good to be true.
thanks again for the help
Steve Huskey




More information about the lfs-support mailing list