moving stuffs between harddisk

Roger Oberholtzer roger
Mon Feb 7 06:34:38 PST 2005


On Mon, 2005-02-07 at 11:44, Man-wai Chang wrote:
> Roger Oberholtzer wrote:
> > On Mon, 2005-02-07 at 03:56, Man-wai Chang wrote:
> >> how do you copy the MBR if you don't use dd?
> > 
> > You don't. If you use GRUB, you issue the very simple GRUB commands to
> > do this. Either to the disk as a whole or to a particular partition. I
> > would imagine that there is a LILO counterpart.
> > 
> > For GRUB:
> > 
> > 	root (hd0,0)		# Or whatever your disk is
> > 
> > 	find /boot/grub/stage1	# Verify that the root command is 				# correct.
> > This will list the ones
> > 				# found.
> > 
> > 	setup (hd0)		# Install GRUB on disk's MBR.
> > 
> > 	- or -
> > 
> > 	setup (hd0,0)		# Install GRUB on disk's first
> > 				# partition.
> 
> I guess I knew how to do it in lilo (via the boot parameter), but not 
> with grub. SO in your example, if I want to write the mbr to /dev/hdc, I 
> only need to change:
> 
> "setup (hd0)" to "setup (hd2)"

Assuming that the /boot/grub files are on /dev/hdc, yes.

+????????????????????????????+???????????????????????????????+
? Roger Oberholtzer          ?   E-mail: roger at opq.se        ?
? OPQ Systems AB             ?      WWW: http://www.opq.se/  ?
? Nybrogatan 66 nb           ?    Phone: Int + 46 8   314223 ?
? 114 41 Stockholm           ?   Mobile: Int + 46 733 621657 ?
? Sweden                     ?      Fax: Int + 46 8   314223 ?
+????????????????????????????+???????????????????????????????+



More information about the Linux-users mailing list