I have a dual-boot system with two SATA drives, the first being Windows and the second being OpenSuse 11.1 (sdb). I need to add disk space. I have a 1T drive that I want to use to replace the Windows drive. Problem is, the first drive, with Windows, is where the grub boot loader is installed.
Is it possible to install grub on the second drive (sdb) and then re-cable it to the first position (sda), making it the boot drive - or will it hose up Linux when the device ID changes?
It’s possible.
If you know what your plan is, you can edit /etc/fstab so when you do boot, there is less confusion. So long as none of your linux partitions are the drive you are removing.
A live cd like Parted Magic is very handy as you can do all your partitioning with it, set boot flag and re-install grub.
The grub info is probably located on your linux /(root) partition.
You can read about grub here: All About Grub - openSUSE
This bit will do the grub reinstall:
If you have a Linux Live CD, boot from it and log in. Then open a console window and enter su and you will be at the command prompt with root powers and ready to proceed. If on the other hand you have the openSUSE install DVD, boot from it and on the first menu of options select the Rescue System option. That will start an elementary Linux Live operating system and bring you to the login prompt. Enter the username root and you will be at the command prompt with root powers and ready to proceed. Whichever way you started (the openSUSE install DVD or a Linux Live CD) when you are at the root command prompt, first you find the partition containing openSUSE’s bootloader. Then you reinstall Grub with a pointer to that partition. First find the openSUSE installation:
You enter this ---------------- grub
Computer returns like this ---- grub>
You enter this ---------------- find /boot/grub/menu.lst
Computer returns like this ---- (hd0,5)
Here, (hd0,5) is Grub’s pointer to my openSUSE installation. Your pointer will be different from my example (hd0,5). Substitute your values for my example (hd0,5). Now that you have the pointer, proceed like this:
You enter this ---------------- root (hd0,5)
Computer returns like this ---- Filesystem type is ext2fs, partition type 0x83
You enter this ---------------- setup (hd0)
You see several lines like this — Checking if /boot/grub/stage1 exists … yes Computer finally returns this-- Succeeded…Done
You enter this ---------------- quit
You enter this ---------------- reboot