[opensuse] Swap file question for dual-boot openSUSE install
Currently, I have openSUSE 11.1 on a separate HDD (HD # 2). I would like to install openSUSE 11.0 on HD # 3. How can I go about doing this such that the present bootloader (grub, installed on MBR of HD # 1) will also boot openSUSE 11.0 on HD # 3 ? Also, is it possible to have a single swap partition for the 2 installs of openSUSE (without confusing grub between the 2 installs of openSUSE)? The present swap partition is on HD # 2, for the openSUSE 11.1 operating system. PS: HD # 1 has Windows XP, with grub on MBR. GRUB is used to boot into Windows XP as well. Jay -- Registered Linux User # 483705 @ http://counter.li.org/ openSUSE 11.1 Smolts Profile: http://www.smolts.org/client/show/?uuid=pub_b541a450-9bc1-45fd-beab-d46ee43a... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, Feb 4, 2009 at 06:22, Jay Mistry <jaylinux53@gmail.com> wrote:
Currently, I have openSUSE 11.1 on a separate HDD (HD # 2). I would like to install openSUSE 11.0 on HD # 3. How can I go about doing this such that the present bootloader (grub, installed on MBR of HD # 1) will also boot openSUSE 11.0 on HD # 3 ? There are two ways I know of to do this. 1 - Install grub on the HD #3 when installing oS11 and add a stanza to grub of oS11.1 to chainload grub of oS11. The benefit of this is that kernel updates will automatically update the correct grub. 2 - Install oS11 and tell it not to install grub. Then manually add a stanza for oS11 to the grub of oS11.1
Also, is it possible to have a single swap partition for the 2 installs of openSUSE (without confusing grub between the 2 installs of openSUSE)? The present swap partition is on HD # 2, for the openSUSE 11.1 operating system. Yes. The installer should automatically recognize the swap partition and add them to /etc/fstab
HTH ne... -- Registered Linux User # 125653 (http://counter.li.org) Now accepting personal mail for GMail invites. Samuel Goldwyn - "I had a monumental idea this morning, but I didn't like it." -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There are two ways I know of to do this. 1 - Install grub on the HD #3 when installing oS11 and add a stanza to grub of oS11.1 to chainload grub of oS11. The benefit of this is that kernel updates will automatically update the correct grub.
So this means that there will be 2 grub bootloaders- 1 for openSUSE 11.1 & other for openSUSE 11.0 ?
2 - Install oS11 and tell it not to install grub. Then manually add a stanza for oS11 to the grub of oS11.1
Is there a disadvantage to the second option (which seems more easy) ? Jay -- Registered Linux User # 483705 @ http://counter.li.org/ openSUSE 11.1 Smolts Profile: http://www.smolts.org/client/show/?uuid=pub_b541a450-9bc1-45fd-beab-d46ee43a... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, Feb 5, 2009 at 06:39, Jay Mistry <jaylinux53@gmail.com> wrote:
There are two ways I know of to do this. 1 - Install grub on the HD #3 when installing oS11 and add a stanza to grub of oS11.1 to chainload grub of oS11. The benefit of this is that kernel updates will automatically update the correct grub.
So this means that there will be 2 grub bootloaders- 1 for openSUSE 11.1 & other for openSUSE 11.0 ? Yes.
2 - Install oS11 and tell it not to install grub. Then manually add a stanza for oS11 to the grub of oS11.1
Is there a disadvantage to the second option (which seems more easy) ? The only one I can think of is that you will manually have to add the an entry for oS11 to menu.1st whenever you upgrade its kernel.
ne... -- Registered Linux User # 125653 (http://counter.li.org) Now accepting personal mail for GMail invites. Johnny Carson - "I was so naive as a kid I used to sneak behind the barn and do nothing." -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
----- Original Message ----- From: "Jay Mistry" <jaylinux53@gmail.com> To: "OS-en" <opensuse@opensuse.org> Sent: Wednesday, February 04, 2009 1:22 AM Subject: [opensuse] Swap file question for dual-boot openSUSE install
Currently, I have openSUSE 11.1 on a separate HDD (HD # 2). I would like to install openSUSE 11.0 on HD # 3. How can I go about doing this such that the present bootloader (grub, installed on MBR of HD # 1) will also boot openSUSE 11.0 on HD # 3 ?
Also, is it possible to have a single swap partition for the 2 installs of openSUSE (without confusing grub between the 2 installs of openSUSE)? The present swap partition is on HD # 2, for the openSUSE 11.1 operating system.
PS: HD # 1 has Windows XP, with grub on MBR. GRUB is used to boot into Windows XP as well.
It will be a little tricky installing the 3rd drive, only in that you should probably make sure to tell it not to try to configure or touch the bootloader config at all, and then go set that up yourself manually from the existing 11.1 install after the first reboot. Assuming a very simple setup where your suse 11.1 has just one swap partition and one root partition and no seperate /boot partition, and assuming swap id part 1 and root is part 2,
From 11.1, your existing grub might look like:
/boot/grub/device.map: (hd0) /dev/sda (hd1) /dev/sdb /boot/grub/menu.lst (excerpt): ---snip--- title openSUSE 11.1 kernel (hd1,0)/vmlinuz root=/dev/sda2 resume=/sda1 showopts initrd (hd1,0)/initrd title WindowsXP ... ---snip--- After install you can boot into 11.1 and edit both files above to add knowledge of the new drive: /boot/grub/device.map: (hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc /boot/grub/menu.lst (excerpt): ---snip--- title openSUSE 11.1 kernel (hd1,1)/vmlinuz root=/dev/sdb2 resume=/dev/sdb1 showopts initrd (hd1,1)/boot/initrd title openSUSE 11.0 kernel (hd2,0)/vmlinuz root=/dev/sdc1 resume=/dev/sdb1 showopts initrd (hd2,0)/boot/initrd title WindowsXP ... ---snip--- What happens here is: 1 - grub loads frm the mbr of drive 1 2 - grub was told back at grub setup time to look for grub files such as menu.lst on "(hd1)", which maps to /dev/sdb via device.map. So that's what happens next is grub looks for menu.lst on drive 2. 3 - If you select "11.1" from the menu above, grub tries to load vmlinuz from /boot/grub on "(hd1,1)" which is partition 2 (counting from 0) on hd1, which is "drive 2 partition 2" in human terms, which is /dev/sda2. It also tries to load initrd from the same place. The root=/dev/sdb2 tells the kernel to try to mount "/" on /dev/sdb2. The resume=/dev/sdb1 tells the kernel to try to do suspend & resume from /dev/sdb1, which is your swap. 4 - once the os is running, /etc/fstab says to use /dev/sdb1 for swap. The new additions add: The bios still boots the already existing grub frommbr of drive 1 (/dev/sda) This grub still tries to find it's next needed files in /boot on /dev/sdb2. But now once having read those files, you can choose the new added choice which will: * Try to load vmlinuz and initrd from /boot/... on /dev/sdc1 (assumimg this entire drive is just "/" with no seperate /boot or swap) * Tell the kernel to suspend & resume from /dev/sdb1, your already existing swap. * Tell the kernel to mount "/" on /dev/sdc1 Then once the os is running fstab has exactly the same line for swap that 11.1 has, to use /dev/sdb1 for swap. You can select that during install so theres nothing special to fix up now for swap. Your actual menu.lst probably looks quite different because I removed extraneous junk that suse always adds and also probably it's using guid strings to identify the different drives and partitions instead of /dev/sdxx device names. You can actually use the litteral values above instead, at least for the new drive. You can safely try it by just copying the existing stanza to make a new menu choice, alter the title name a little, and change the root=... to root=/dev/sdaXX where XX is whatever your root partition really is, and then reboot and try the new menu choice. If it boots up, then you just proved you know how to edit grub successfully and you know it will work for the new drive too. If it doesn't boot up, no problem it was just an extra menu choice, the original working one is still right there. You can trial & error until you get it right without losing access to your existing windows & 11.1, as long as you make sure to inhibit the 11.0 install from generating a boot loader. There is a screen relating to boot loader setup during install where you get a chance to tell it to do nothing. Honestly, chances are it would actually create a working config automatically if you let it. But I prefer not to take the chance. I'd rather suffer the burden of setting that up myself in trade for the safety that it can't possibly screw it up if I don't let it touch it at all. -- Brian K. White brian@aljex.com http://profile.to/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, Feb 4, 2009 at 2:14 PM, Brian K. White <brian@aljex.com> wrote:
----- Original Message ----- From: "Jay Mistry" <jaylinux53@gmail.com> To: "OS-en" <opensuse@opensuse.org> Sent: Wednesday, February 04, 2009 1:22 AM Subject: [opensuse] Swap file question for dual-boot openSUSE install
Currently, I have openSUSE 11.1 on a separate HDD (HD # 2). I would like to install openSUSE 11.0 on HD # 3. How can I go about doing this such that the present bootloader (grub, installed on MBR of HD # 1) will also boot openSUSE 11.0 on HD # 3 ?
Also, is it possible to have a single swap partition for the 2 installs of openSUSE (without confusing grub between the 2 installs of openSUSE)? The present swap partition is on HD # 2, for the openSUSE 11.1 operating system.
PS: HD # 1 has Windows XP, with grub on MBR. GRUB is used to boot into Windows XP as well.
It will be a little tricky installing the 3rd drive, only in that you should probably make sure to tell it not to try to configure or touch the bootloader config at all, and then go set that up yourself manually from the existing 11.1 install after the first reboot.
Assuming a very simple setup where your suse 11.1 has just one swap partition and one root partition and no seperate /boot partition, and assuming swap id part 1 and root is part 2, From 11.1, your existing grub might look like:
/boot/grub/device.map: (hd0) /dev/sda (hd1) /dev/sdb
/boot/grub/menu.lst (excerpt): ---snip--- title openSUSE 11.1 kernel (hd1,0)/vmlinuz root=/dev/sda2 resume=/sda1 showopts initrd (hd1,0)/initrd
title WindowsXP ... ---snip---
After install you can boot into 11.1 and edit both files above to add knowledge of the new drive:
/boot/grub/device.map: (hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc
/boot/grub/menu.lst (excerpt): ---snip--- title openSUSE 11.1 kernel (hd1,1)/vmlinuz root=/dev/sdb2 resume=/dev/sdb1 showopts initrd (hd1,1)/boot/initrd
title openSUSE 11.0 kernel (hd2,0)/vmlinuz root=/dev/sdc1 resume=/dev/sdb1 showopts initrd (hd2,0)/boot/initrd
title WindowsXP ... ---snip---
What happens here is: 1 - grub loads frm the mbr of drive 1 2 - grub was told back at grub setup time to look for grub files such as menu.lst on "(hd1)", which maps to /dev/sdb via device.map. So that's what happens next is grub looks for menu.lst on drive 2. 3 - If you select "11.1" from the menu above, grub tries to load vmlinuz from /boot/grub on "(hd1,1)" which is partition 2 (counting from 0) on hd1, which is "drive 2 partition 2" in human terms, which is /dev/sda2. It also tries to load initrd from the same place. The root=/dev/sdb2 tells the kernel to try to mount "/" on /dev/sdb2. The resume=/dev/sdb1 tells the kernel to try to do suspend & resume from /dev/sdb1, which is your swap. 4 - once the os is running, /etc/fstab says to use /dev/sdb1 for swap.
The new additions add: The bios still boots the already existing grub frommbr of drive 1 (/dev/sda) This grub still tries to find it's next needed files in /boot on /dev/sdb2. But now once having read those files, you can choose the new added choice which will: * Try to load vmlinuz and initrd from /boot/... on /dev/sdc1 (assumimg this entire drive is just "/" with no seperate /boot or swap) * Tell the kernel to suspend & resume from /dev/sdb1, your already existing swap. * Tell the kernel to mount "/" on /dev/sdc1
Then once the os is running fstab has exactly the same line for swap that 11.1 has, to use /dev/sdb1 for swap. You can select that during install so theres nothing special to fix up now for swap.
Your actual menu.lst probably looks quite different because I removed extraneous junk that suse always adds and also probably it's using guid strings to identify the different drives and partitions instead of /dev/sdxx device names. You can actually use the litteral values above instead, at least for the new drive. You can safely try it by just copying the existing stanza to make a new menu choice, alter the title name a little, and change the root=... to root=/dev/sdaXX where XX is whatever your root partition really is, and then reboot and try the new menu choice. If it boots up, then you just proved you know how to edit grub successfully and you know it will work for the new drive too. If it doesn't boot up, no problem it was just an extra menu choice, the original working one is still right there. You can trial & error until you get it right without losing access to your existing windows & 11.1, as long as you make sure to inhibit the 11.0 install from generating a boot loader. There is a screen relating to boot loader setup during install where you get a chance to tell it to do nothing.
Honestly, chances are it would actually create a working config automatically if you let it. But I prefer not to take the chance. I'd rather suffer the burden of setting that up myself in trade for the safety that it can't possibly screw it up if I don't let it touch it at all.
-- Brian K. White brian@aljex.com http://profile.to/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
Brian, If it helps, I have all the grub bootloader files (/boot/grub/device.map, /boot/grub/menu.lst, /etc/grub.conf) here: http://www.nopaste.com/p/as7pqzOtB. PS: The new oS 11.0 install that I wish to make will actually be an overwrite of an earlier (non-functional OS- non-resolvable problem with gnome, with Nautilus crashing and no desktop icons) openSUSE 11.1 install ... the earlier one being on HDD # 2 (WDC_WD5000AAKS-00YGA0). The earlier one still has it's own bootloader (grub). Jay -- Registered Linux User # 483705 @ http://counter.li.org/ openSUSE 11.1 Smolts Profile: http://www.smolts.org/client/show/?uuid=pub_b541a450-9bc1-45fd-beab-d46ee43a... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2009-02-04 at 11:52 +0530, Jay Mistry wrote:
Also, is it possible to have a single swap partition for the 2 installs of openSUSE (without confusing grub between the 2 installs of openSUSE)? The present swap partition is on HD # 2, for the openSUSE 11.1 operating system.
Use the same swap file for all your Linux installations, regardless of version. It is erased on boot, anyway, there is no shared data. The only circumstance for having different swaps would be because you hibernate one and restore another, which is a no-no - unless you know what you are doing while you aim a loaded gun to your foot.
PS: HD # 1 has Windows XP, with grub on MBR. GRUB is used to boot into Windows XP as well.
Keep that grub in MBR, and tell the second Linux to install its grub in its own root partition. Then, in the first grub you load the second grub: title Secondary grub root (hd0,7) configfile /boot/grub/menu.lst Of course, adapt that "(hd0,7)" to your settings. (You can also add another entry in the second grub to go to the first one). The advantage of having the second grub separate is that YaST and updates will not mess with your other grub. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkmKzZcACgkQtTMYHG2NR9XPUQCdHSb8odW7Yp0JkZLgPJXEBm/D 10UAn2jP63tMkYc5Eh2RRx8V+/hGtEMZ =4K0+ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Brian K. White
-
Carlos E. R.
-
Jay Mistry
-
ne...