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.
Hi
I have to fix my LFS system. I done dd copy of sdb1 which was lfs then put back on a new hard drive which was partition the same, The new drive was set as sdb1. then dd back the img to the same partition on new drive. When I try to boot all I get is the word "GRUB-" and flashing cursor.
The original HD was 40gig new drive is 80gig But sdb1 was formatted as ext4 and partition 16gig the same as original
Hi
Grub was installed on the sdb drive only.
So your advice would be boot a live cd mount sdb1 then
Code:
grub-install /dev/sdb1
No! This will place grub on sdb1, not the mbr.
I don't know what you have previously done, this being sdb. Did you originally put grub on the mbr of sdb or sda? Put it there where you have put it before. If this is sdb then:
Code:
grub-install /dev/sdb
Quote:
I presume that is as root
Yep.
BTW: Is grub used that came with LFS or are you using grub that's part of another distro (the one on sda?) If another distro's grub is used: DO NOT use the above command, it will overwrite the one used by the other distro.
ok I have loaded Ubuntu live cd mounted lfs sdb1. I ran the command sudo grub-install /dev/sdb I get an error.
Code:
grub-probe: error: cannot find a device for /boot/grub.
No path or device is specified.
Try ``grub-probe --help'' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
ubuntu@ubuntu:/media/lfs/boot$ cd grub
ubuntu@ubuntu:/media/lfs/boot/grub$ sudo grub-install /dev/sdb
grub-probe: error: cannot find a device for /boot/grub.
No path or device is specified.
Try ``grub-probe --help'' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
I ran sudo command from ubuntu live cd not chroot.
So the other option would be to chroot into lfs here.
I take it you have not tried copying to a new drive before?
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
Quote:
Originally Posted by spiky0011
I take it you have not tried copying to a new drive before?
Yes I have done this before, but unlike you I dd-ed the entire drive (sda) and not a partition (sdaX). All ran fine afterwards (removed the old disk and started using the clone).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.