[lfs-support] Error on Reboot

Pierre Labastie pierre.labastie at neuf.fr
Tue Mar 31 02:09:54 PDT 2015


Hi,

I note below the points you should check.

Le 31/03/2015 10:07, Ayan Kumar Nath a écrit :
> Hi Guys,
>
> I am building LFS for the first time and am just not able to make the 
> system boot after the Grub Install.
>
> root:/sources/grub-2.02~beta2# fdisk -lu
Are you running those commands from chroot jail?
>
> Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x0009682b
>
> Device     Boot   Start      End  Sectors  Size Id Type
> /dev/sda1  *       2048  1026047  1024000  500M 83 Linux
> /dev/sda2       1026048 41943039 40916992 19.5G 8e Linux LVM
>
> Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x00000000
Null disk identifier? Normally, all disks, virtual, have one. Also, 
there is not partition listed.
>
>
> Disk /dev/mapper/centos-swap: 2 GiB, 2147483648 bytes, 4194304 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk /dev/mapper/centos-root: 17.5 GiB, 18798870528 bytes, 36716544 
> sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> root:/sources/grub-2.02~beta2#
>
>
>
> root:/sources/grub-2.02~beta2# mount
> /dev/sdb on / type ext4 (rw,relatime,data=ordered)
> devtmpfs on /dev type devtmpfs 
> (rw,nosuid,size=496136k,nr_inodes=124034,mode=755)
> devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
> proc on /proc type proc (rw,relatime)
> sysfs on /sys type sysfs (rw,relatime)
> tmpfs on /run type tmpfs (rw,relatime)
Seems OK from the chroot jail.
> root:/sources/grub-2.02~beta2#
>
>
> It's a virtual machine running CentOS and LFS is installed on /dev/sdb
>
> Grub:
>
> oot:/boot/grub# cat /boot/grub/grub.cfg
> # Begin /boot/grub/grub.cfg
> set default=0
> set timeout=5
>
> insmod ext2
> set root=(hd0,2)
>
> menuentry "GNU/Linux, Linux 3.19-lfs-7.7" {
>         linux   /boot/vmlinuz-3.19-lfs-7.7 root=/dev/sda2 ro
> }
Hmm, so grub/grub.cfg is in the /boot directory on /dev/sdb (just a 
guess here)?
Did you run "grub-install /dev/sda" or "grub-install /dev/sdb", or not 
at all?

Can you still boot the CentOS system?

You have to make choices regarding:
- where to put the linux kernel you just built.
- which grub and grub.cfg you want to use.

What I would recommend: put the just built kernel in the /boot directory 
on the CentOS system.
Edit /boot/grub/grub.cfg on the CentOS system, and just add the 
menuentry line, except you
have to use root=/dev/sdbx (where x is the partition number where LFS 
reside),instead of /dev/sda2 (which is an LVM partition and is not 
likely to work).

Regards
Pierre


More information about the lfs-support mailing list