LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-25-2013, 03:32 PM   #1
EStyles
LQ Newbie
 
Registered: Jun 2012
Distribution: BackTrack5R3 Gnome/64
Posts: 28

Rep: Reputation: Disabled
Cool Is it possible to use one boot partition for multiple installations?


I have the boot partition of my laptop linux installation on a USB, I am wanting to use that same boot partition for an install on my desktop.

So far I have linux (minus the boot partition) installed on my desktop. My desktop will boot from the USB but when it comes time to boot into the install, it is waiting for the uuid of my laptop.

I am thinking that I can get the boot partition on my USB to recognize the uuid of my desktop as well by editing the grub.cfg but I have never attempted anything of this nature. Would this be the correct way to do this? Is this possible? And if so, can anyone give me any pointers?
 
Old 02-25-2013, 04:09 PM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,551

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
You should be able to chainload to the partition which has the boot files on the laptop by putting the correct drive/partition numbers in the menuentry for it in the grub.cfg file. If you did not create a separate boot partition on the Desktop, it should be whichever partition you installed Linux to. Which distribution of Linux is it? The entry below boots a Linux distro on sda12. You should be able to use it by simply changing the drive/partition numbers:

Quote:
menuentry 'CHAINLOAD LINUX' {
insmod ext2
set root=(hd0,12)
chainloader +1
}
If you are able to boot whichever Linux distro you have on the Desktop machine, just run the 'blkid' command to get the uuid although you don't need it.
 
Old 02-25-2013, 09:01 PM   #3
EStyles
LQ Newbie
 
Registered: Jun 2012
Distribution: BackTrack5R3 Gnome/64
Posts: 28

Original Poster
Rep: Reputation: Disabled
Sorry I should have done a better job of clarifying. My laptop installation works perfect. The boot partition on my USB is for my laptop installation. I have 64 bit BackTrack 5 R3 with Gnome installed with a "full" encryption. I followed thisguide with a few modifications to get the boot partition onto my USB.

I followed the same guide/modifications for installing to my desktop, but left out the boot partition installation. There is a part in the guide where you obtain the uuid of the partition on the hard disk and you edit /etc/crypttab to contain the uuid so that after boot it will find the correct encrypted disk to ask you for your password.

However, when using the boot partition from my USB to boot my desktop, it is only looking for the hard drive with the uuid that is on my laptop.

(I use uuid so that even if the hard drives move from where they were initially installed it won't confuse my system on boot.)

So am I correct in that I need to edit my grub.cfg in my USB boot to contain the uuid of the desktop installation?

and is:


Quote:
menuentry 'CHAINLOAD LINUX' {
insmod ext2
set root=(hd0,12)
chainloader +1
}
the correct way to do this?
 
Old 02-25-2013, 09:48 PM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,551

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
If you do not have a separate /boot partition on your Desktop computer and your boot files are on the / partition, you could use the method I posted to chainload whichever partition your / partition on the Desktop. I don't know about encrypted partitions. I think it would be a problem for Grub to boot an encrypted partition which is one reason for a separate /boot partition not encrypted. You can get the uuid of your / or /boot partition on the Desktop with the command: blkid
 
Old 02-25-2013, 10:04 PM   #5
EStyles
LQ Newbie
 
Registered: Jun 2012
Distribution: BackTrack5R3 Gnome/64
Posts: 28

Original Poster
Rep: Reputation: Disabled
Another thing I forgot to add: the boot partition is not encrypted but everything else is. That's why i put full in quotations, but i forgot to explain that part.

What i am trying to do is find where in the boot partition does it tell boot to look for a particular hard drive/ slash "consecutive" partition and edit that to look for an alternative if it fails to find the first one
 
Old 02-26-2013, 09:25 AM   #6
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,551

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
Which Linux distribution do you have on your Desktop? Is it also Backtrack?
Does the Desktop installation have only a / partition, no /boot partition?
The Grub scripts are in /etc/grub.d directory so that won't help as all you have on the usb is the /boot partition. It's not clear to me whether your Desktop installation is encrypted with one partition?

Grub doesn't loop through possible boot options, that's what the menu is for. You put different entries in the menu identified in the menuentry so you know which is which. You could use the chainload option and put different drive/partition entries (set root=(hd0,1); set root=(hd0,2) to see which one works.

If you can't boot your Desktop, use a Live CD and boot it on the Desktop to get your partition and uuid with blkid. You could also use the Live CD and mount the partition(s) on your Desktop and go to the /boot/grub folder, find the grub.cfg file there and copy the entry to the /boot/grub/grub.cfg file on your usb /boot partition. The drive/partition numbers may change when you are booting from the flash so if your Desktop grub.cfg entry shows (hd0,1) you might put one entry for that and another for (hd1,1).

I don't use separate /boot partitions and I've never done what your are attempting.
 
  


Reply

Tags
boot, installation, multiple, single


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Linux only see the boot partition of other Linux installations? gusblake Linux - Newbie 5 02-13-2010 06:25 PM
multiple installations cicciopallo Linux - General 2 07-27-2004 04:13 AM
Multiple Linux Installations dhbiker Slackware 7 02-13-2004 11:42 PM
Multiple Linux Installations jkpalmer52 Linux - Newbie 1 01-23-2004 02:54 PM
GRUB using /boot partition for multiple Linux/Windows boot? cpv204 Linux - Newbie 7 04-01-2003 03:54 PM


All times are GMT -5. The time now is 07:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration