Partition Reorganization

Sam Fielder srf10130 at vtc.vsc.edu
Sun Feb 17 05:05:00 UTC 2008


SYNass IT Ubuntu / Linux wrote:
> On Sat, 2008-02-16 at 18:36 -0800, Leonard Chatagnier wrote:
>> --- SYNass IT Ubuntu / Linux <i-ubux at synass.net>
>> wrote:
>>
>>> Hello Ubuntu System Experts
>>> May I ask you for your advice and guidance to
>>> overcome a special
>>> problem ?
>>>
>>> After reorganizing my HDD with gParted it looks like
>>> following:
>>> hda1 / ntfs (WIN XPP original installation)
>>> hda2 / ext3 (Ubuntu installation)
>>> hda3 / extended part (rest of HDD)
>>> hda6 / copy of hda2 (my first Ubuntu installation)
>>> swap at the end of the extended partition
>>>
>>> How can I get Ubuntu starting with the one in hda6
>>> ???
>>>
>>> Well, in the menu.lst of both the Ubuntu partitions
>>> it shows hda2 !!
>>>
>>> Where is the pointer to direct either WIN or Ubuntu
>>> ?
>>> Is it MBR and how do I adjust it to my newest
>>> configuration ?
>>>
>>> TIA for your prompt assistance and hints.
>>> Cheers, svobi
>>>
>> Hello SYHass, I'm no expert so take what I say with
>> caution.  That said, have you considered taking the
>> boot tic off of hda2 and ticing it on hda6. I think
>> that should work. If not someone will surely correct
>> me. HTH.
>> Good Luck,  You probably want to run "sudo
>> update-grub" or "grub-update". Can't remember which.
>> Leonard Chatagnier
> 
> 
> Hi Leonard
> My name is svobi ;-)
> Thanks for your feedback and concerns regarding my sensitive action !
> 
> Due its sensitivity I have no courage to play'n risk and need confirmed
> and 
> proven steps to get my Ubuntu boot changed from hda2 to the copied and 
> therefor identical hda6 !!
> 
> Had tried to get a better impression with S.G.D (Super Grub Disk) and 
> noticed that both partitions are recognized. Tried to get it changed 
> to hda6 but didn't workout as expected.
> 
> My assumption:
> While system boots I am able to choose my OS (Ubuntu or Win XPP) and 
> deciding for Ubuntu ... both the menu.lst points to the same hda2 !?
> 
> There MUST be another mark to point to either Ubuntu (old / in hda2) or 
> Ubuntu (new / in hda6) !?
> This may/must happen in the MBR entry !?
> 
> Yes, I still have too many question marks here and 
> therefor I am not feeling comfortable to erase my old Ubuntu and 
> risk a newmbr with the most accurate und wanted Ubuntu in hda6. ;-)
> 
> Any more, especially secure, hints are very very appreciated. ;-))
> 
> TIA and cheers, 
> svobi
> 
> 

save a copy of /boot/grub/menu.lst as menu.old (or whatever you want as 
long as you remember what you call it) sudo cp /boot/grub/menu.lst 
/boot/grub/menu.old

open /boot/grub/menu.lst as root (sudo gedit /boot/grub/menu.lst)

find this section:

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=082dbe45-849c-4ed0-92d3-9b5cb01907ab ro

the last line is the line you need to modify.
Where mine says kopt=root=UUID... replace with your dev/hda6 (as in the 
example above it)

the last line should now read:
# kopt=root=dev/hda6 ro

this sets up the command for grub to reconfigure itself.(which we will 
do in a minute)

first, though, check here:


  ## ## End Default Options ##

title		Ubuntu 7.10, kernel 2.6.22-14-generic
root		(hd0,3)
kernel		/boot/vmlinuz-2.6.22-14-generic 
root=UUID=082dbe45-849c-4ed0-92d3-9b5cb01907ab ro quiet splash
initrd		/boot/initrd.img-2.6.22-14-generic
quiet

you should have a section similar to this. on the lines that begin with 
'root' you should see the identifier we replaced earlier. (UUID=...)

confirm that and save menu.lst and quit

in a terminal enter sudo update-grub
this tells grub to re-read its config and re-write itself.

open boot/grub/menu.lst again and scroll down to the section we just 
looked at and you should see the hda6 on the line for root

as long as your hda6 partition is good you should be ok to reboot and 
you will be running on hda6 instead of hda2.

if you have any problems just restore the menu.old to menu,lst and 
reboot (you may have to use the live cd to get to the file system and 
make the change)

good luck

sam





More information about the ubuntu-users mailing list