LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 07-10-2020, 03:59 PM   #46
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412

ok lets try grub.cfg again

set root=(hd1,2)

linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro
 
Old 07-10-2020, 04:00 PM   #47
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
How do i umount it
That is normal you won't umount those with that command, I'm more interested in the output of ls /boot and ls /boot/mnt after each of the commands in post 38

Last edited by colorpurple21859; 07-10-2020 at 04:04 PM.
 
Old 07-10-2020, 07:10 PM   #48
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
I don't think you have all the drivers needed to access your usb drive built into the kernel from you last sreenshot:
Quote:
Activating all swap files/partitions... swapon: cannot find device for UUID=617d3a82-8c40-4295-a41e-288251c1dfea
There is also similar message for your rootfs
Quote:
mount: /: cant find UUID=42e174ea-46f1-4300-b5c5-870e7f9152f4

Last edited by colorpurple21859; 07-10-2020 at 07:16 PM.
 
Old 07-11-2020, 12:55 AM   #49
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
Good Morning,
Sir,
From Chapter 8.3.2. Configuring Linux Module Load Order
Quote:
The program
that loads modules, modprobe or insmod, uses /etc/modprobe.d/usb.conf for this purpose. This file needs
to be created so that if the USB drivers (ehci_hcd, ohci_hcd and uhci_hcd) have been built as modules, they will be
loaded in the correct order; ehci_hcd needs to be loaded prior to ohci_hcd and uhci_hcd in order to avoid a warning
being output at boot time.
Create a new file /etc/modprobe.d/usb.conf by running the following:
Quote:
install -v -m755 -d /etc/modprobe.d
cat > /etc/modprobe.d/usb.conf << "EOF"
# Begin /etc/modprobe.d/usb.conf
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
# End /etc/modprobe.d/usb.conf
EOF
What is this about?
Does this mean my drivers are loaded?
How do i check that?
 
Old 07-11-2020, 01:16 AM   #50
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
spiky0011
Sir,
i also added
set root=(hd1,2)

and

linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro

Last edited by Shah404; 07-11-2020 at 01:27 AM.
 
Old 07-11-2020, 01:23 AM   #51
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
spiky0011
Sir,
i also added
set root=(hd1,2)

and

linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro

rebooted,

Quote:
cant find /boot/vmlinuz-5.5.3-lfs-9.1 file
Click image for larger version

Name:	WhatsApp Image 2020-07-11 at 11.49.28 AM.jpeg
Views:	19
Size:	209.9 KB
ID:	33630
 
Old 07-11-2020, 02:48 AM   #52
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
ok I dont know why it's not finding the kernel.
Lets try using vmlinz from host boot
It looks like host is on sda4?
 
Old 07-11-2020, 03:46 AM   #53
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
Sir,
yeah root system of host is on sda4.

You are saying i should change my grub.cfg to
Quote:
set root=(hd0,?)

linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sda4 rootdelay=10 ro
what about
Quote:
set root=(hd0,?)
hd0 is first partition right, which is sda.
and what about other parameter?
what is that?

Quote:
shahrukh@shahrukh-HP-15-Notebook-PC:/boot$ ls
config-5.4.0-39-generic grub initrd.img.old memtest86+_multiboot.bin vmlinuz vmlinuz.old
config-5.4.0-40-generic initrd.img kernel System.map-5.4.0-39-generic vmlinuz-5.4.0-39-generic
config-5.5.3 initrd.img-5.4.0-39-generic memtest86+.bin System.map-5.4.0-40-generic vmlinuz-5.4.0-40-generic
efi initrd.img-5.4.0-40-generic memtest86+.elf System.map-5.5.3 vmlinuz-5.5.3-lfs-9.
Thank You
 
Old 07-11-2020, 03:50 AM   #54
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
set root=(hd0,4)

linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro

Just check that vmlinuz-5.5.3-lfs-9.1 Is in host /boot. from what I remember it was.
 
Old 07-11-2020, 04:02 AM   #55
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
On rebooting
Quote:
hd0,4 not found
my grub.cfg
Quote:
menuentry 'unknown Linux distribution (on /dev/sdb2)' --class linux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-42e174ea-46f1-4300-b5c5-870e7f9152f4' {
insmod part_gpt
insmod ext2
set root='hd0,4'
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro
}
submenu 'Advanced options for unknown Linux distribution (on /dev/sdb2)' $menuentry_id_option 'osprober-gnulinux-advanced-42e174ea-46f1-4300-b5c5-870e7f9152f4' {
menuentry 'unknown Linux distribution (on /dev/sdb2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.5.3-lfs-9.1--42e174ea-46f1-4300-b5c5-870e7f9152f4' {
insmod part_gpt
insmod ext2
set root='hd0,4'
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro
}
}
Quote:
blkid /dev/sda4
/dev/sda4: UUID="717167f2-63b5-4d1e-ad97-594bcc22c844" TYPE="ext4" PARTUUID="4837e416-114d-4ceb-9d88-6d1f99886096"
sda4 is ext4.
but insmod is ext2 in grub.cfg, is it wrong?, or i am wrong?

Last edited by Shah404; 07-11-2020 at 04:25 AM.
 
Old 07-11-2020, 04:25 AM   #56
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
paste whole grub.cfg to https://bpaste.net
paste URL back here

paste
Code:
lsblk
here

and vmlinuz-5.5.3-lfs-9.1 Is in host /boot.
 
1 members found this post helpful.
Old 07-11-2020, 04:30 AM   #57
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
https://bpa.st/SNUQ

lsblk
Quote:
shahrukh@shahrukh-HP-15-Notebook-PC:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55M 1 loop /snap/core18/1705
loop1 7:1 0 55M 1 loop /snap/core18/1754
loop2 7:2 0 255.6M 1 loop /snap/gnome-3-34-1804/36
loop3 7:3 0 240.8M 1 loop /snap/gnome-3-34-1804/24
loop4 7:4 0 62.1M 1 loop /snap/gtk-common-themes/1506
loop5 7:5 0 127.3M 1 loop /snap/qbittorrent-arnatious/30
loop6 7:6 0 127.3M 1 loop /snap/qbittorrent-arnatious/40
loop7 7:7 0 49.8M 1 loop /snap/snap-store/433
loop8 7:8 0 27.1M 1 loop /snap/snapd/7264
loop9 7:9 0 49.8M 1 loop /snap/snap-store/467
loop10 7:10 0 29.8M 1 loop /snap/snapd/8140
loop11 7:11 0 163.7M 1 loop /snap/spotify/41
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 196.3G 0 part
├─sda2 8:2 0 170.5G 0 part
├─sda3 8:3 0 9.3G 0 part /boot/efi
├─sda4 8:4 0 28G 0 part /
└─sda6 8:6 0 61.2G 0 part
sdb 8:16 1 28.7G 0 disk
├─sdb1 8:17 1 100M 0 part /media/shahrukh/3e141aea-2491-44be-96a0-14c0d05
├─sdb2 8:18 1 12G 0 part /media/shahrukh/42e174ea-46f1-4300-b5c5-870e7f9
└─sdb3 8:19 1 4G 0 part
sr0 11:0 1 1024M 0 rom
Quote:
shahrukh@shahrukh-HP-15-Notebook-PC:~$ cd /boot
shahrukh@shahrukh-HP-15-Notebook-PC:/boot$ ls
config-5.4.0-39-generic memtest86+.elf
config-5.4.0-40-generic memtest86+_multiboot.bin
config-5.5.3 System.map-5.4.0-39-generic
efi System.map-5.4.0-40-generic
grub System.map-5.5.3
initrd.img vmlinuz
initrd.img-5.4.0-39-generic vmlinuz-5.4.0-39-generic
initrd.img-5.4.0-40-generic vmlinuz-5.4.0-40-generic
initrd.img.old vmlinuz-5.5.3-lfs-9.1
kernel vmlinuz.old
memtest86+.bin
 
Old 07-11-2020, 04:36 AM   #58
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
The last time you compiled the lfs kernel,
what mount commands did your run to mount the lfs system and chroot into it,
commands you ran when compiled your lfs kernel?
 
Old 07-11-2020, 04:54 AM   #59
Shah404
Member
 
Registered: Jun 2020
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
export LFS=/mnt/lfs

sudo mount -v -t ext4 /dev/sdb2 $LFS
sudo mount -v -t ext2 /dev/sdb1 $LFS/boot

sudo /sbin/swapon -v /dev/sdb3

su - lfs

sudo -s

export LFS=/mnt/lfs
cd $LFS

chroot $LFS /usr/bin/env -i HOME=/root TERM=$TERM PS1='(lfs chroot) \u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

then i untar linux-5.5.3.tar.xz
cd linux-5.5.3
make mrproper
make defconfig
make menuconfig
make
make modules_install

As a root user in host
Quote:
mount --bind /boot /mnt/lfs/boot
Then in lfs
Quote:
cp -iv arch/x86/boot/bzImage /boot/vmlinuz-5.5.3-lfs-9.1
cp -iv System.map /boot/System.map-5.5.3
cp -iv .config /boot/config-5.5.
install -d /usr/share/doc/linux-5.5.3
cp -r Documentation/* /usr/share/doc/linux-5.5.
Then usb.conf
Quote:
install -v -m755 -d /etc/modprobe.d
cat > /etc/modprobe.d/usb.conf << "EOF"
# Begin /etc/modprobe.d/usb.conf
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
# End /etc/modprobe.d/usb.conf
EOF
END

While make menuconfig
i couldnt find these
Quote:
[*] open by fhandle syscalls [CONFIG_FHANDLE]
Quote:
[ ] Fallback user-helper invocation for firmware loading [CONFIG_FW_LOADER_USER_HELPER]

Last edited by Shah404; 07-11-2020 at 04:57 AM.
 
Old 07-11-2020, 04:59 AM   #60
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
this section
Quote:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
edit to
Quote:
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.


menuentry "MY LFS" {
insmod ext2
set root=(hd0,4)
linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/sdb2 rootdelay=10 ro
}
### END /etc/grub.d/40_custom ###
then when grub comes up select MY LFS from menu
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS Version 9.1, 8.4.3. Setting Up the GRUB Configuration Shah404 Linux From Scratch 6 07-06-2020 01:21 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] Which version of book to use for BLFS??? (LFS-6.7 used for building LFS) rkmv Linux From Scratch 3 02-21-2012 05:32 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration