(no subject)

John Gay johngay at eircom.net
Fri Apr 16 09:13:05 PDT 2004


On Thu 15 Apr 2004 09:23, Declan Moriarty wrote:
> raman_montylee enlightened us
>
> > Hi there,
> > I have completed LFS 5.0.
> > It runs fine from the harddisk.
> > I have created a bootable CD that runs fine from my computer.
> > But when i run the mount command it shows my harddisk partition mounted
> > on which i created my LFS system, so i think the CD still depends on the
> > harddisk. If i run the CD on a different computer it gives the following
> > error:
> >
> > ds: no socket drivers loaded!
> > hda6: bad access: block=2, count=2
> > end_request: I/O error, dev 03:06 (hda), sector 2
> > EXT2-fs: unable to read superblock
> > hda6: bad access: block=64, count=2
> > end_request: I/O error, dev 03:06 (hda), sector 64
> > isofs_read_super: bread failed, dev=03:06, iso_blknum=16, block=32
> > Kernel panic: VFS: Unable to mount root fs on 03:06
> >
> > In my home i created LFS on /dev/hda6 so i think the CD is depending on
> > the harddisk. I have created the boot cd from the faq given on the LFS
> > website and the /etc/fstab file has no entry for the harddisk so i
> > suppose i have done everything correct.
> >
> > So, please help me to make a correct boot CD.
> > Please reply soon as it is my final year project.
>
> You are right. The kernel on the cd depends on your hard disk
>
> Check your /etc/fstab, and your boot loader. In the loader (grub or
> lilo) you have to specify which is the root filesystem. That should be
> the cd.
>

Also, the kernel, when not given any info, has a default rootsf built into it. 
Since you copied the kernel from your working system,s it expects to find the 
rootfs on /dev/hda6. This can be changed with the rdev command.

man rdev will explain the ins and outs of this. This was more particular when 
you could copy a kernel directly to a floppy to boot with. But I think more 
recent kernels require a seperate bootloader, where the rootfs can be set.

So there are two ways out of this:

1) specify the rootfs explicitly in the bootloader. The kernel will then mount 
the specified filesystem as root.

2) run rdev on the boot kernel image specifying the rootfs. The kernel will 
then mount the rootfs specified in the rdev command.

The first way is prefered, as rdev was only a hack for use with earlier 
kernels. Read the man page for rdev carefully before using that option.


Cheers,

	John Gay



More information about the blfs-support mailing list