Moving Linux to new hotswappable HDD.

Soldato
Joined
5 Jul 2003
Posts
16,206
Location
Atlanta, USA
Hi.
Im looking at getting a 2nd HDD for my laptop, around 60-80Gb in size, and having that for Linux and storage.
Im wondering, if i can:
A) Copy my entire Linux partition/OS/Data/Swap to the new drive.
&
B) If i can have Grub run fine wether the Linux HDD is in the laptop or not, allowing me to still boot into windows if the 2nd drive isnt there.

Thanks in advance all. :)
 
find a boot cd and do:
Code:
dd if=/dev/hda of=/dev/hdb conv=notrunc,noerror
where hda is the original and hdb the one you want to copy to.

you can still boot fine, obviously if you choose linux it won't boot but windows will still boot fine.
 
How big of a partition on the main drive would i need for Grub?
And how would i go about putting it there?
 
Depending on whether your BIOS supports booting from USB drives, Id be tempted to opt to install GRUB on the boot partition on that drives linux installation and use your boot options to opt to boot from the USB drive. Would mean less chance of fubaring your existing HD setup :)
 
not if you explicitly tell the BIOS to boot from the external disk (if the BIOS supports that). If what you said was carte blanche then my DSL pen drive wouldnt work :p
 
then to boot from windows you'll need to change the bios every time as there won't be a usb drive and therefore a bootloader. which sounds a PITA.
 
Can be, but less of a PITA than accidentally blatting your existing MBR because grub has stored its conf files on a drive that wont be permanently plugged in- maybe Im spoiled by the fact most modern Dells/HPs Ive used have a Function key to invoke a boot menu. However IIRC BoomAM is using a fairly new thinkpad so there is a good chance he has this facility
 
Last edited:
the bootloader needs to be installed on the MBR (on the first HD) so he can choose to boot both OSs. slight risk or messing stuff up, but safe enough for thousands of people to do it fine. tad easier than booting via BIOS too, that is what it's for after all.
 
So.
After all the discussion.
I should be able to install grub to the primary drive, and then the secondary drive can be removed and grub will still let me into the OS on the primary drive without problems?

How would i go about setting grub up like that?
 
None, using the command you gave me in a previous post, im going to be copying my existing Ubuntu Dapper installation over to the secondary drive.
 
ah right, not very sharp today. do you have a livecd or similar? without it you'll struggle to get grub working again.
 
Back
Top Bottom