[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The Fine Art of Making a Bootable Drive; more



I use sysrescuecd (http://www.sysresccd.org/) to make a new drive bootable.  There are two ways to get a bootable disk with sysrescuecd.

One way is to use a special boot mode where sysrescue starts its own kernel to a system on the hard disk.  Once booted you can just use 'grub-install /dev/sda' to install grub on the boot drive.  I run software raid1 so I do this for both drives just in case I need to boot from sdb. 

A second way is to start sysrescuecd normally and mount the root file system  to a directory.  Make a directory say x and mount the root filesystem on it.  Run these three commands:  "mount --bind /dev  x/dev"  and "mount --bind /proc  x/proc" and "mount --bind /sys  x/sys".  Then run "chroot x /bin/bash" to get a command prompt running off of your root file system with the dev, proc and sys populated correctly.  Now you can run the grub install command and hopefully get a bootable drive.

The first method works the best since sometimes grub gets confused in the chroot environment and cant find the hard drive you want to install it on.

...Bob
On 08/13/2014 11:27 AM, Martin G. McCormick wrote:
AW writes:
1. As far as I know, it's not possible to simply copy a working /dev tree.
These are special files which are generated with the mknod utility.

2. Booting a computer is fairly complex.  Everything needs to be at a 
specific
location on the drive, needs to occupy the appropriate sectors - which 
vary in
precise size depending on the drive geometry as well as the partitioning. 
 And
everything needs to appropriately connected together.

3. dd copies at the bit level.  It's a low level utility.  And that's why 
it
works, while the high level rsync or cp utility will not.
	This certainly makes sense to me but it has some rather
interesting disaster recovery implications. In this case, I am
just going to a newer and slightly larger boot drive and I am
lucky to have both the actual hard drive and a thumb drive copy
of that drive to experiment with. The thumb drive copy is also a
dd clone of the original hard drive and is obviously good
because it was what I used to make the new boot drive. If one
was having a bad day and their boot drive made a horrible noise
and blew out a cloud of aluminum and iron oxide dust as the
consequence of the meeting of a read/write head and the surface
of a platter, they have no options save for recycling of the
materials in the old drive. If they want to restore their old
system, they must be able to restore the boot drive  before
applying their backup media whatever that happens to be. Chances
are very good that the new boot drive will be larger or
different in some way from the old one.
	I am not disagreeing with what you said, but it sounds
like it could be a lot of trouble to restore that system.

Martin




Reply to: