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

Re: swapping master & slave HDs: what to change? (solved - pls comment!)

hi ya

On 2 Oct 2004, SpamHog wrote:

to swap disks ...
	== make sure you have a boot floppy and a boot cd
	== that can boot into that disk you are currently using

	/dev/hda  --> /dev/hdb

	change hda->hdb in /etc/fstab

	change hda->hdb in /etc/lilo.conf
	-- or --
	change hd0 to hd1 in /boot/grub/menu.list

- boot the disk after its been physiclly swapped on the cables ...
	lilo# vmlinuz root=/dev/hda	( the new hda -- was prev hdb )

	same for editing the grub cmd line to chanage root=/dev/hda

- any mbr info ( including floppy, cd, .. ) can boot into the rootfs
  of the new swapped disk

- once its boot ... run lilo ...
	- reboot again and now you dont need the other boot media
	( cd, floppy or old hda to boot the new hda )

- or do it the hard way ..
	chroot /mnt/new-swapped lilo --> leads to loads of fun

	( you probably will still want a boot media to rescue
	( the box if the new swapped disk doesnt boot

other stuff is too much work

> * MBR or whole boot sector:
> If you use Lilo, you just need the boot record (first 512 bytes).  If
> you use another bootloader like GRUB, you'd better backup the whoe 1st
> SECTOR, i.e. the first 64 records.  GRUB stores the so called "stage
> 1.5" in trat area.  GAG puts code there too.
> * Just the MBR:
> 	dd count=1 bs=512 if=/dev/hda of=<path><filename>

if of is the new target disk, it will wipe out your partition table of
your new disk ( bs=446 or bs=448 is better ) if you want to preserve
the partitions on the target disk

c ya

Reply to: