Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have currently setup LFS ( LFS 7.9 ) with custom modules and all looks fine so far. But needed assistance in making it bootable.
Since I am running it in a virtual machine ( OpenSuse 13.2 ), I can break, crash , restore n number of times.
I am unable to make it boot.
Goal here is to boot the machine, and have grub give me an option to boot into LFS and actual host installation ( dual boot ).
Quote:
linux-upri:/boot/grub2 # fdisk -l ( AS seen on host machine )
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: 0x0007fcd0
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 2248703 2246656 1.1G 82 Linux swap / Solaris
/dev/sda2 * 2248704 23230463 20981760 10G 83 Linux
/dev/sda3 23230464 41943039 18712576 8.9G 83 Linux
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: 0x00021b05
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4196351 4194304 2G 82 Linux swap / Solaris
/dev/sdb2 * 4196352 35653631 31457280 15G 83 Linux
Here, sdb2 is where I have built LFS.
fstab ( as seen when logged into chroot )
Quote:
oot:/etc# cat fstab
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
Probably booting directly into HD2 will not work because of the way how fstab has been updated ( guessing ). So my main goal as of now is to update the entry of lfs so that when I reboot, I get to choose Opensuse + LFS .
OpenSUSE is installed on /dev/sda in the vm? Presumably, grub was installed on /dev/sda when you installed OpenSUSE and /dev/sda is probably the default boot device. Thus, you would need to add the menu entry to the grub.cfg on /dev/sda2.
OpenSUSE is installed on /dev/sda in the vm? Presumably, grub was installed on /dev/sda when you installed OpenSUSE and /dev/sda is probably the default boot device. Thus, you would need to add the menu entry to the grub.cfg on /dev/sda2.
Yes, you are right, Opensuse is installed on /dev/sda and this is the default boot device.
I managed to update the entry by following method
edit this file on opensuse : /etc/grub.d/40_custom
with
menuentry "GNU/Linux, Linux 4.4.2-avanish-7.9" {
savedefault
insmod ext2
set root='(hd1,2)'
linux /boot/vmlinuz-4.4.2-lfs-7.9 root=/dev/sdb2 ro
}
and run this command as root.
grub2-mkconfig -o /boot/grub/grub.cfg
By doing this, I was able to get the entry updated in grub. But ended up with another error. This time kernel panic when booting into LFS.
VFS: unable to mount root fs on unknown block(0,0)
Any idea whhat went wrong here?
# Optional, required for VMware virtual machines
# Begin here
Misc devices --->
<*> VMware VMCI Driver
# End here
Code:
# Optional, required for VMware virtual machines
# Begin here[*] SCSI low-level drivers --->
<*> BusLogic SCSI support (used by older VMware virtual solutions, can be optionally selected)
<*> VMware PVSCSI driver support (used by vSphere I think, but not by default, can be used by Player and Workstation too)
# End here
Also I not sure but maybe you have to have "Additions" for usb in VMware?.
You also said you are using "opensuse grub" to boot They tend to use alot of modules and an intrid to boot there systems.
When using lfs grub sdb
set root=(hd1,2) should be set root=(hd0,2) IF booting from 2nd/usb drive. As grub see it as the 1st drive mbr (sda) with the root on 2nd drive sdb2
# Optional, required for VMware virtual machines
# Begin here
Misc devices --->
<*> VMware VMCI Driver
# End here
Code:
# Optional, required for VMware virtual machines
# Begin here[*] SCSI low-level drivers --->
<*> BusLogic SCSI support (used by older VMware virtual solutions, can be optionally selected)
<*> VMware PVSCSI driver support (used by vSphere I think, but not by default, can be used by Player and Workstation too)
# End here
Also I not sure but maybe you have to have "Additions" for usb in VMware?
I installed grub by running
grub-install /dev/sda ( I did this purposefully )
I believe I managed to fix it by installing the low level drivers. So now, when I log into lfs ( My first custom built Linux yipeeee !! ), I am getting bash 4.3 prompt. None of the credentials are working. The only one that seemed to work is the one when I configured Shadow. Is this normal?
I need some assistance here now.
1. I reverted the changes made so far back to the time when I began Chapter 8. Making the LFS System Bootable. Reason : I wanted dual boot option. So I guess, I must configure grub. I am no longer able to achieve this. Can you help me on this please?
If I run grub-install /dev/sda in my chroot environment, I only get to log into my LFS system. My opensuse host is lost.
This is just beginning. There's still lot more to compile in BLFS. I am specifically interested in configuring GUI. Might need all of your assistance when it comes to it and I am sure members here would be there to back me up when time comes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.