On 24-05-2012 11:07, Ken Moffat wrote:
> On Thu, May 24, 2012 at 03:07:34PM +0800, Omar wrote:
>> Hi, all:
>> I finished all work of the LFS 7.1 book except the error when booting my LFS.
>>
>> Firstly, I states my LFS 7.1.
>> I use VMware installed Ubuntu 10.04 on a virtual SCSI disk of 20G.
>> Before beginning, I add another 8G virtual SCSI disk to VM and mount it
>> in the Ubuntu manually. So the first disk with Ubuntu displays sda in
>> /dev/ and the second which is mounted newly displays sdb in /dev/.
>> Following the book I install LFS 7.1 on the sdb1 which is formatted with
>> ext3 on the sdb and given only one partition. All pass with no error.
> 
> [...]
>>
>> After a few works such as logout and unmount, I reboot the
>> computer. But it starts up using Ubuntu again only appearing error
>> checking of a moment.
>>
>> Then I change the cmd in chapter 8.4.3 to grub-install /dev/sda and keep
>> grub.cfg the same and reboot again. The computer gives errors as follows
>> and stop starting up.
>>

>  So, you have overwritten the ubuntu grub.cfg.

You have also overwritten the MBR of sda. Probably Ubuntu's grub version
is different from LFS's.

>> md: Autodetecting RAID arrays.
>> md: Scanned 0 and added 0 devices.
>> md: Autorun ...
>> md: ... autorun DONE.
>> Root-NFS: on NFS server address
>> VFS: Unable to mount root fs via NFS. trying floppy.
>> VFS: cannot open root device "sdb1" or unknown-block(2.0)
>> Please append a correct "root=" boot option; here are the available 
>> partitions:
>> 0b00    1048575   sr0 driver: sr
>> Kernel panic - not syncing: VFS: Unable to mount root fs on 
>> unknown-block(2.0)
>> Pid: 1. comm: swapper/0 Not tained 3.2.6 #1
>> Call trace:
>> ...mount_block_root+0x141/0x1c9...mount_root...kernel_init...
>> 

>> 
>> I search this problem from lfs mail list and google, which says
>> that compiling kernel needs some SCSI driver or changing hda to sda in the
>> grub.cfg and etc. .I compile the kernel again with more drivers like
>> SCSI. When I reboot again, it is the same.
>> 
>> Could anybody help me? Thanks in advance.
>>
>> Omar
> 
>  You have booted *a* linux kernel, so I don't think Elly's
> suggestions to change where grub is looking or installed will be
> needed.  If I've read correctly, you now only have one entry in
> grub.cfg and that one doesn't boot.
> 
>  I think you might have booted the ubuntu kernel : that needs its
> initrd to be able to access anything.  If you can get to the grub
> command line, and you know what the initrd is called, you might be
> able to edit the commandline (if the initrd is still there).
> Otherwise, recover from a backup.  Once you can boot the ubuntu VM,
> you will be able to use that to fix problems with your LFS system.
> 
>  After that, add the LFS system to ubuntu's grub.cfg by *editing*
> that file so that there are entries for both ubuntu and LFS, not by
> running programs and NOT by overwriting it.  When you have the LFS
> system booting and working correctly, you can think about doing
> without the ubuntu VM (hint: until you can download other software
> to it, the LFS system is not particularly useful),
> 
>  Note that I know very little about Virtual Machines, they just seem
> to make it harder for new builders.
> 
> ĸen

Please, if you can, provide the output of

    cat /etc/lsb-release

I believe you have first to fix Ubuntu, and doing so, the other part
will be fixed as well.

If you can boot into Ubuntu, run as root:

    grub-install /dev/sda

to get back the original grub in the MBR.

Then, as root, run

    update-grub

This will create a new grub.cfg in /etc/boot/grub which will have also a
menuentry for LFS.

If you cannot boot, the instructions above should be done using chroot.
This will be a little more difficult. Ubuntu's live CD or iso image can
be used, but first you have to be able to change the VM bios boot order
to have CD option before HD option. This is a little tricky, as you have
to the hit Esc key *only once* during the time the VMW bar is
displaying.

Before going on with the explanation of how to chroot in, we need more
feedback from you.

-- 
[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to