Recently installed Debian Linux on a new disk drive. I still had my old drive with all my settings, data, files and so on. I want access to the old drive partitions while I worked on the new larger disk.
I could mount the old drive and access files from the mount, but I still wanted access to some applications and settings on the old disk. The easiest way to do this, was to Multi Boot from GRUB. I want the option to boot the old drive or the new.
If I need file access, I can do a temporary mount. The multi-boot set up allows me to work on the new disk at my leisure, till I'm ready to transfer files and wipe the old disk.
There's a lot of info on GRUB Multi Boot and a lot of HowTo's kicking around. Most are out of date. Many are misleading. Some refer to editing menu.lst or editing grub.conf. Both files no longer exist in GRUB. They have been replaced by grub.cfg, which is not to be manually edited. It states in grub.cfg.
Here's an excerpt:
$ cat /boot/grub/grub.cfg
# DO NOT EDIT THIS FILE
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
After installing Debian Linux on a new disk, including GRUB, here's the method for advising GRUB of your other disk and OS:
1. Shut down your system
2. Disconnect power from machine
3. Attach old disk
4. Connect power to your box
5. Boot system
6. Press del key to enter BIOS set up
7. Go to Boot section > Boot order
8. Ensure new disk is select as first boot device
9. Check old disk is recognized.
10. Save settings and exit
11. System reboots into your new disk
12. Fire up XTerm or other Terminal emulator
13. Become root user
14. dmesg | grep sd
This will display all your disks.
Your first boot device will be sda1 (your new disk).
Your old disk will be sdb1. This is for SATA disks.
IDEs disks will be labelled hda1 and hdb1.
15. Run the update grub command and pass your old disk as argument
# update-grub /dev/sdb1
Grub will run off and do its thing
16. Reboot system
On system reboot, you should see your old disk lower down the menu boot. Select it and hit enter to boot off your old disk.
That's about it.
P.S. If you want to boot your new disk and need access to your files, you can do a temporary mount of your old disk. To create a mount point and mount your old disk, become root and do:
# mkdir /mnt/olddisk
# mount -t ext3 /dev/sdb1 /mnt/olddisk
If your not running ext3 on the old disk, replace with ext2 or fat, or whatever is there. If you run XP on the old disk it will have NTFS file system. You will need ntfs-3g utils to access NTFS files.
Do aptitude search ntfs for options and aptitude show for more info.