Grub-problem
Hi,
I just finished building LFS, now its time to boot, but unfortunately I tried alot but all my efforts vain. FYI output for fdisk -l from my host is cot@boss:~$ sudo fdisk -l Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xe175b05b Device Boot Start End Blocks Id System /dev/sda1 * 1 26 204800 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 26 7715 61760512 7 HPFS/NTFS /dev/sda3 7715 26167 148212736 5 Extended /dev/sda4 26167 38914 102391808 83 Linux /dev/sda5 9044 22160 105355264 7 HPFS/NTFS /dev/sda6 22160 26167 32183296 7 HPFS/NTFS /dev/sda7 7715 9044 10671104 83 Linux Partition table entries are not in disk order cot@boss:~$ I builded my LFS at /dev/sda7, You may note that I has no seperate partition for /boot or anything for /swap etc FYI my laptop is already dual bootable holds windows 7 and Linux earlier..but now I am trying to add one more os (LFS)... and from my host /etc/fstab is cot@boss:~$ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'vol_id --uuid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # / was on /dev/sda7 during installation UUID=ece89103-0538-45dc-82ab-5014e9ed9798 / ext3 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation UUID=7170833c-376c-4620-a234-3f9fd309887b none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0 cot@boss:~$ and inside my LFS /etc/fstab is root:/# cat /etc/fstab # Begin /etc/fstab # file system mount-point type options dump fsck # order /dev/sda7 / ext3 defaults 1 1 proc /proc proc nosuid,noexec,nodev 0 0 sysfs /sys sysfs nosuid,noexec,nodev 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /run tmpfs defaults 0 0 devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 # End /etc/fstab root:/# and /boot/grub/grub.cfg from my host is cot@boss:~$ cat /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi set default="0" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { insmod vbe insmod vga insmod video_bochs insmod video_cirrus } insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm fi terminal_output gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 set locale_dir=($root)/boot/grub/locale set lang=en insmod gettext set timeout=5 ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/05_debian_theme ### insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 insmod png if background_image /usr/share/images/desktop-base/boss-grub.png ; then set color_normal=black/black set color_highlight=white/black else set menu_color_normal=cyan/blue set menu_color_highlight=white/blue fi ### END /etc/grub.d/05_debian_theme ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'BOSS GNU/Linux, with Linux 3.7.8-pimpi3' --class boss --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 echo 'Loading Linux 3.7.8-pimpi3 ...' linux /boot/vmlinuz-3.7.8-pimpi3 root=UUID=348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 ro splash vga=791 quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.7.8-pimpi3 } menuentry 'BOSS GNU/Linux, with Linux 3.7.8-pimpi3.old' --class boss --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 echo 'Loading Linux 3.7.8-pimpi3.old ...' linux /boot/vmlinuz-3.7.8-pimpi3.old root=UUID=348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 ro splash vga=791 quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.7.8-pimpi3 } menuentry 'BOSS GNU/Linux, with Linux 2.6.39-bpo.2-686-pae' --class boss --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 echo 'Loading Linux 2.6.39-bpo.2-686-pae ...' linux /boot/vmlinuz-2.6.39-bpo.2-686-pae root=UUID=348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 ro splash vga=791 quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.39-bpo.2-686-pae } menuentry 'BOSS GNU/Linux, with Linux 2.6.32-5-686' --class boss --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos4)' search --no-floppy --fs-uuid --set 348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 echo 'Loading Linux 2.6.32-5-686 ...' linux /boot/vmlinuz-2.6.32-5-686 root=UUID=348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20 ro splash vga=791 quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.32-5-686 } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/30_otheros ### # This entry automatically added by the Debian installer for a non-linux OS # on /dev/sda1 menuentry "Windows Vista (loader)" { set root=(/dev/sda,msdos1) search --no-floppy --fs-uuid --set daeecc96eecc6c77 chainloader +1 } ### END /etc/grub.d/30_otheros ### ### 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 ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### cot@boss:~$ As directed in LFS book, I created a seperate file /boot/grub/grub.cfg inside LFS partition as follows root:/# cat /boot/grub/grub.cfg # Begin /boot/grub/grub.cfg set default=0 set timeout=5 insmod ext2 set root=(hd0,7) menuentry "GNU/Linux, Linux 3.7.9-lfs-7.3-rc1" { linux /boot/vmlinuz-3.7.9-lfs-7.3-rc1 root=/dev/sda7 ro } EOF root:/# and FYI I can see this difference at host cot@boss:~$ sudo grub-install -v grub-install (GRUB) 1.98+20100804-4boss4 at LFS root:/# grub-install -v grub-install (GRUB) 2.00 LFS book suggests one more way to create a seperate partiton for boot...If do that I think I may lose everything what I have now..? I think I may need to work on host side, so that it may find my LFS I have no clue for this problem..kindly help me in this.... |
Quote:
Quote:
Quote:
Code:
menuentry "GNU/Linux, Linux 3.7.9-lfs-7.3-rc1" { Quote:
|
LFS - grub
Hi,
I solved my grub problem, I just copied 1) vmlinuz-3.7.9 -> kernel image 2) System.map -> symbol file 3) config-3.7.9 -> configuration file into /boot directory of my distro, where my GRUB2 is available, and also I created a new script inside /etc/grub.d/ as below #!/bin/sh exec tail -n +3 $0 # My LFS # on /dev/sda7 menuentry "LinuxFromScratch" { insmod ext2 set root=(hd0,7) linux /boot/vmlinuz-3.7.9-lfs-7.3-rc1 root=/dev/sda7 ro } with a name 30_otherLFS, and made executable. after running, sudo update-grub my kernel got placed inside /boot/grub/grub.cfg all is well till now... But when I booted, and tried to login my LFS, after authetication, it shows some error as below //////////////////////// login:root password: Last login: Thu Mar 21 14:00:04 +0530 2013 on /dev/tty1 No mail cannot execute /bin/bash : No such file or directory //////////////////////// again it prompts me to login, same exists on each time of login... I can't under stand this, Help me in this... |
Hi
Check your /etc/passwd file is correct maybe pozt it here |
Hi,
my /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false nobody:x:99:99:Unprivileged User:/dev/null:/bin/false looks like this.... |
/bin/bash problem
Hi,
my /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false nobody:x:99:99:Unprivileged User:/dev/null:/bin/false looks like this.... |
/bin/bash problem
Hi,
Friends, after doing some research I found solution to my problem at http://www.mail-archive.com/lfs-supp.../msg05752.html $ls -l /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6 -rwxr-xr-x 1 root root 1152240 2006-08-11 04:43 /bin/bash -> I miss this line lrwxrwxrwx 1 root root 13 2006-07-23 21:41 /lib/libc.so.6 -> libc-2.3.4.so lrwxrwxrwx 1 root root 14 2006-07-23 21:41 /lib/libdl.so.2 -> libdl-2.3.4.so lrwxrwxrwx 1 root root 17 2006-08-06 03:59 /lib/libncurses.so.5 -> libncurses.so.5.4 where as my root:/# ls -l /lib/libncursesw.so.5 /lib/libdl.so.2 /lib/libc.so.6 lrwxrwxrwx 1 root root 12 Mar 11 12:13 /lib/libc.so.6 -> libc-2.17.so lrwxrwxrwx 1 root root 13 Mar 11 12:13 /lib/libdl.so.2 -> libdl-2.17.so lrwxrwxrwx 1 root root 18 Mar 12 10:02 /lib/libncursesw.so.5 -> libncursesw.so.5.9 root:/# you can judge that I am missing the first line... I hope it may belong to /lib/libc.so.6.... I believe after installing bash (pass 2) this may get rectify... Please share your suggestions to solve this issue.... Whether I am pointing at correct direction....? |
Have you fixed the problem ???
|
No spiky
problem is same as before.... $ls -l /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6 -rwxr-xr-x 1 root root 1152240 2006-08-11 04:43 /bin/bash -> I miss this line lrwxrwxrwx 1 root root 13 2006-07-23 21:41 /lib/libc.so.6 -> libc-2.3.4.so lrwxrwxrwx 1 root root 14 2006-07-23 21:41 /lib/libdl.so.2 -> libdl-2.3.4.so lrwxrwxrwx 1 root root 17 2006-08-06 03:59 /lib/libncurses.so.5 -> libncurses.so.5.4 where as mine root:/# ls -l /lib/libncursesw.so.5 /lib/libdl.so.2 /lib/libc.so.6 lrwxrwxrwx 1 root root 12 Mar 11 12:13 /lib/libc.so.6 -> libc-2.17.so lrwxrwxrwx 1 root root 13 Mar 11 12:13 /lib/libdl.so.2 -> libdl-2.17.so lrwxrwxrwx 1 root root 18 Mar 12 10:02 /lib/libncursesw.so.5 -> libncursesw.so.5.9 root:/# Any clue??? |
Did you read the whole thread you linked to? The problem in that thread was a missing # in fstab.
Code:
# Begin /etc/fstab Don't worry about the output of 'ls -l /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6' not showing '/bin/bash'. It's not supposed to. With that command you only tell it to list those files you added to the command. If you want to see '/bin/bash' you can run 'ls -l /bin/bash'. |
/bin/bash problem
Hi,
I was aware of # problem, there is no such problem with me...I reinstalled my bash too. but it was not effective... Share me any suggesstions...am trying side by side |
Quote:
No promises, but I think that's happened before around here. It would be an easy mistake to make (in chapter 6.6), and difficult to detect unless you actually look for it. Anyway, no harm to find out. |
Hi
Do you get a prompt when you login??? What is the output of ls -l /bin/sh "LFS" and ls -l /bin/bash echo $SHELL |
Does /bin/bash work in chroot? You can get this error 'cannot execute /bin/bash : No such file or directory' if some of the shared libraries bash needs are missing.
From your host system run: Code:
cd /mnt/lfs # or whatever mountpoint you use Code:
$ ldd bin/bash For exampel: Code:
ls -l lib/libreadline.so.6 |
/bin/bash problem
Hi,
Dear Stoat..... You are great as per your suggesstion, I saw fault with my /etc/passwd, it was "root:x:0:0:root:/root:/bin/bash " I changed it to "root:x:0:0:root:/root:/bin/bash"....You know my LFS works fine now... But only thing, I wrongly configured my /etc/sysconfig/console, since I'm unable to enter any symbols like ;:'"{})(_-+/ etc.. inside my vim editor.. what ever my LFS works...I feel very very happy... |
All times are GMT -5. The time now is 09:59 AM. |