PDA

View Full Version : [ubuntu] [SOLVED] installation moved to another partition how to boot up?



ramaswamyps
November 17th, 2008, 07:53 AM
i have moved the / to another bigger partition for want of space.
now i cant seem to boot from here with same initrd.
and fstab.
what are things to be done to be able to boot from this new partition?
tried to mount the new partition without uuid
kernel panic occurs.
fstab suitably adjusted.

i cant find how to make new initrd

help and some guidance needed.

Herman
November 17th, 2008, 10:37 AM
:) Hello ramaswamyps,
You might find this link useful, Rescue your Linux system with a Live CD (http://users.bigpond.net.au/hermanzone/p10.htm#Mounting_Ubuntu_with_Dapper_Desktop_LiveCD ).

You probably need to run 'sudo blkid' command for an up-to-date list of your file system uuid numbers.

Then you probably need to add the new uuid number to your Ubuntu booting stanza in your /boot/grub/menu.lst file. (Except since you will be in your Live CD, it will be /media/ubuntu/boot/grub/menu.lst instead, for now).

Are you using Intrepid or an earlier version of Ubuntu?

With Intrepid, you will see two uuid numbers in your /menu.lst file, the first one is for the partition which contains you kernel, and the second uuid is where you paste the uuid for the / partition, most of the time those two will be the same unless you have a separate /boot.

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 4d4939f2-de30-438a-896f-af6a77406eea
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=4d4939f2-de30-438a-896f-af6a77406eea ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quietIf you have Hardy Heron, there will just be a uuid for / in your /boot/grub/menu.lst booting stanza for Ubuntu, which you should update.

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd2,0)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=6178d387-9ab5-4f23-a56d-8e0cba0addc3 ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quietIn either case you should also update your / uuid number in kopt= (http://users.bigpond.net.au/hermanzone/p15.htm#kopt) to make the changes persistent over future kernel upgrades. (Or it will revert to the old uuid and fail to reboot every time you get a new kernel).

I think that should fix it for you, I hope so anyway. If you still have trouble, then please post here again and ask more questions.

Regards, Herman :)

ramaswamyps
November 17th, 2008, 11:24 AM
thanks for this valuable information.
i will try to follow what you have said.
currently i was able to boot with editing /etc/mtab
for /dev/sdb8 / ext3 to /dev/hda1 ext3
and editing fstab same way to accomodate /dev/hda1 without any uuid.
it booted and i have grub-install /dev/sda1
it currently looks like working.

to be sure i will follow the way you have shown.

thanks.


i moved the ubuntu-8.04 in the place where i tried ubuntu-8.10 where i have trouble with video driver and resolution.
though i managed to make it accept vga connected i810 it use to get stuck every now and then.
so i formated the 12gb partition and moved the 8.04 from old 6gb partition.

i use only one single partition /

my data partitions are mounted for saving and loading whaen needed.
so i stand less chance of losing data.


is the vol uuid number generated by installer or we can provide any number as you have shown above.??

excuse my ignorance :)

ramaswamyps
November 17th, 2008, 11:40 AM
root@ramaswamy-desktop:~# blkid
/dev/sda1: UUID="63e6d0e7-3792-4de6-a013-25187ee9f022" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="55817dc3-12ae-473c-9464-30c8487c210c"
/dev/sda6: LABEL="GENTOO" UUID="7dec1185-0d9e-4b55-bdee-df5d5a166023" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: LABEL="gentoo desktop" UUID="77b341d0-a301-47a9-be3d-4cb1ffa9cdcd" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: UUID="D0C8CA6DC8CA5200" LABEL="WIN2KPRO" TYPE="ntfs"
/dev/sdb5: LABEL="WINXP PRO" UUID="174C-15E1" TYPE="vfat"
/dev/sdb6: UUID="C82CFCD82CFCC30C" TYPE="ntfs"
/dev/sdb7: UUID="4408-6EA2" TYPE="vfat"
/dev/sdb8: UUID="4a9f3b36-f302-46c7-a411-81547090494a" TYPE="ext3" SEC_TYPE="ext2"
root@ramaswamy-desktop:~#


will this automatically update fstab and mtab?

grub menu list i can edit

what exactly those id numbers mean? the vol format number?

just to understand a little more of what i do with blkid command.

Herman
November 17th, 2008, 11:42 AM
is the vol uuid number benerated by installer or we can provide any number as you have shown above.?? File system uuid numbers are unique and you need to use the same exact number as the command 'blkid' tells you belongs to the file system you have.
sudo blkid'uuid' stands for 'universal unique identifier', so yours should be the only one in the world with whatever number yours has and mine should be the only one in the world with the uuid number mine has.

Another command that does much the same thing as 'sudo blkid' is,

ls /dev/disk/by-uuid/ -alh

Herman
November 17th, 2008, 11:54 AM
currently i was able to boot with editing /etc/mtab
for /dev/sdb8 / ext3 to /dev/hda1 ext3
and editing fstab same way to accomodate /dev/hda1 without any uuid.
it booted and i have grub-install /dev/sda1So I guess you want to use /dev/hda1 as your new / ?

will this automatically update fstab and mtab? No, it just shows you what the uuid numbers are for each of your current file systems.

grub menu list i can editOkay, good. :)

what exactly those id numbers mean? the vol format number? Yes, they are like a number that can be used to identify each of your individual file systems.

just to understand a little more of what i do with blkid command.
root@ramaswamy-desktop:~# blkid
/dev/sda1: UUID="63e6d0e7-3792-4de6-a013-25187ee9f022" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="55817dc3-12ae-473c-9464-30c8487c210c"
/dev/sda6: LABEL="GENTOO" UUID="7dec1185-0d9e-4b55-bdee-df5d5a166023" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: LABEL="gentoo desktop" UUID="77b341d0-a301-47a9-be3d-4cb1ffa9cdcd" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: UUID="D0C8CA6DC8CA5200" LABEL="WIN2KPRO" TYPE="ntfs"
/dev/sdb5: LABEL="WINXP PRO" UUID="174C-15E1" TYPE="vfat"
/dev/sdb6: UUID="C82CFCD82CFCC30C" TYPE="ntfs"
/dev/sdb7: UUID="4408-6EA2" TYPE="vfat"
/dev/sdb8: UUID="4a9f3b36-f302-46c7-a411-81547090494a" TYPE="ext3" SEC_TYPE="ext2"
root@ramaswamy-desktop:~#
You copy the number for the file system in your / partition and paste it into your /etc/fstab file or into your /boot/grub/menu.lst file in the correct place to overwrite the old numbers that are there.

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=6178d387-9ab5-4f23-a56d-8e0cba0addc3 ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quietIf '6178d387-9ab5-4f23-a56d-8e0cba0addc3' is the old number and '63e6d0e7-3792-4de6-a013-25187ee9f022' is the new number, you paste '63e6d0e7-3792-4de6-a013-25187ee9f022' over the old number to overwrite it.

Like this,

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=63e6d0e7-3792-4de6-a013-25187ee9f022 ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet

ramaswamyps
November 17th, 2008, 01:38 PM
i did the uuid part and it boots ok.
most applications fail to open.
i had edited the /etc/mtab also.
is it because of that?
how the mtab should look like?

following is the mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-21-generic/volatile type tmpfs (rw)
/dev/sda1 on /mnt/hda1 type ext3 (rw,nosuid,nodev)
/dev/sda6 on /mnt/hda6 type ext3 (rw,nosuid,nodev)
/dev/sda7 on /mnt/hda7 type ext3 (rw,nosuid,nodev)
/dev/sdb1 on /mnt/hdc1 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=512)
/dev/sdb6 on /mnt/hdc6 type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sdb5 on /mnt/hdc5 type vfat (rw,nosuid,nodev)
/dev/sdb7 on /mnt/hdc7 type vfat (rw,nosuid,nodev)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
root@ramaswamy-desktop:~# cat /etc/mtab
/dev/sda1 / ext3 rw,relatime,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.24-21-generic/volatile tmpfs rw 0 0
/dev/sda1 /mnt/hda1 ext3 rw,nosuid,nodev 0 0
/dev/sda6 /mnt/hda6 ext3 rw,nosuid,nodev 0 0
/dev/sda7 /mnt/hda7 ext3 rw,nosuid,nodev 0 0
/dev/sdb1 /mnt/hdc1 fuseblk rw,nosuid,nodev,noatime,allow_other,blksize=512 0 0
/dev/sdb6 /mnt/hdc6 fuseblk rw,nosuid,nodev,noatime,allow_other,blksize=4096 0 0
/dev/sdb5 /mnt/hdc5 vfat rw,nosuid,nodev 0 0
/dev/sdb7 /mnt/hdc7 vfat rw,nosuid,nodev 0 0
securityfs /sys/kernel/security securityfs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
root@ramaswamy-desktop:~#


i thought the uuid is to be there in mtab also

fstab

root@ramaswamy-desktop:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
#UUID=55817dc3-12ae-473c-9464-30c8487c210c none swap sw 0 0
/dev/sda1
UUID=63e6d0e7-3792-4de6-a013-25187ee9f022 / ext3 relatime,errors=remount-ro 0 1
/dev/scd1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd0 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sda1 /mnt/hda1 ext3 rw,user,exec 0 0
/dev/sda6 /mnt/hda6 ext3 rw,user,exec 0 0
/dev/sda7 /mnt/hda7 ext3 rw,user,exec 0 0
/dev/sdb1 /mnt/hdc1 ntfs rw,user,exec 0 0
/dev/sdb6 /mnt/hdc6 ntfs rw,user,exec 0 0
/dev/sdb5 /mnt/hdc5 vfat rw,user,exec 0 0
/dev/sdb7 /mnt/hdc7 vfat rw,user,exec 0 0
root@ramaswamy-desktop:~#



it will take long time to reinstall.i have gnome kde-3.5 and kde-4.1.2 installed.

or is there a reconfigure of all packages possible?
what command.?

thanks for your patience with me :)

Herman
November 17th, 2008, 07:45 PM
i did the uuid part and it boots ok.
most applications fail to open.
i had edited the /etc/mtab also.
is it because of that?
how the mtab should look like? I don't know, I have never tried editing /etc/mtab.
I wish I could help you but really I don't know what could be wrong now.

Maybe try running a normal file system check from a Live CD,
Running a filesystem check on an ext3 filesystem (http://users.bigpond.net.au/hermanzone/p10.htm#filesystem_check_on_an_ext3_filesystem)

sudo e2fsck -C0 -p -f -v /dev/sda1
Maybe that will help.

Your /etc/fstab looks okay to me.

Regards, Herman :confused:

ramaswamyps
November 18th, 2008, 03:24 AM
thanks for reply Herman

i corrected mtab also with uuid for / partition.
then all started working ok.
but mtab came back to above shown in the next boot.

actually mtab was holding the system from mounting sda1
as it was having record for sdb8 earlier.

anyway it seems to have solved the major problems after moving the installation.

so i will mark it solved.

it is worth studying more about mtab and its action