boot device mixup - please help !

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

boot device mixup - please help !

Postby soundcheck on Sun Apr 05, 2009 4:20 am

Hi folks.

As Husse wrote in the Wiki - UUID is causing (might cause?) problems in case you change/add/delete partitions.
UUID will be reshuffeld and therefore you might not have the right UUID configured in grub and /etc/fstab. Correct so far?

Following that advise I configured everything without UUID. I read also an advise in the Backup-How-To to change to /dev/sdX mounts for better transparency.
I thought -- OK let me do it.

But now - exactly the reason why UUID had been introduced - a random assignment of device-ids such as /dev/sda, /dev/sdb is causing another problem.

In case I connect this or that HDD to the PC I get a random assignment of /dev/sdX.

Example: I got two disks in the PC - my data disk (/dev/sda) my boot disk (/dev/sdb) All configs (grub/fstab) are made accordingly.
As soon as I unplug my data disk (sda) I need to manually change the boot prompt to /dev/sdaX.
If you have a look at below printouts fdisk shows me an /dev/sda and df a /dev/sdb7 ( Which obviously is the fstab entry)
However the whole thing boots up if change the boot command - very strange.

I'd appreciate if somebody can give ma hint how to solve or tackle the issue. It is getting even more complicated if I attach my 3rd disk (backup device) to the PC.

To me it looks pretty much like this:

If I use different HDDs in different configuratuions UUID is a must. If I do some repartitioning work I need to configure new UUID in grub and fstab.
But - will this prevent from mess-ups in case of changing disk-Ids (sda/sdb)?

Can somebody confirm thisẞ

THX a lot.

Code: Select all
think ~ # fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1669c708

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10651    85554126    7  HPFS/NTFS
/dev/sda2           18902       19457     4460400   12  Compaq diagnostics
Partition 2 does not end on cylinder boundary.
/dev/sda3           10652       18901    66268125    5  Extended
/dev/sda5   *       10652       12391    13976518+  83  Linux
/dev/sda6           18560       18901     2747083+  82  Linux swap / Solaris
/dev/sda7           12392       18301    47472043+  83  Linux
/dev/sda8           18302       18559     2072353+  82  Linux swap / Solaris

Partition table entries are not in disk order
think ~ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb7             46726956   5160604  39192752  12% /
tmpfs                  1555520         0   1555520   0% /lib/init/rw
varrun                 1555520       344   1555176   1% /var/run
varlock                1555520         0   1555520   0% /var/lock
udev                   1555520      2860   1552660   1% /dev
tmpfs                  1555520        12   1555508   1% /dev/shm
lrm                    1555520      2000   1553520   1% /lib/modules/2.6.27-7-generic/volatile
tmpfs                  2097152      2544   2094608   1% /tmp
think1 ~ #



soundcheck
Level 2
Level 2
 
Posts: 57
Joined: Mon Mar 02, 2009 2:53 pm

Linux Mint is funded by ads and donations.
 

Re: boot device mixup - please help !

Postby soundcheck on Sun Apr 05, 2009 6:11 am

Hi.

I switched everything back to UUID. Now it is stable again. I don't think it is a good idea to get away from UUID as recommended by Husse in the Wiki and the backup-script guy in the How-to section.

I am not sure how to gonna manage automated backups (dd/sfdisk/...) now. I need to check that out.

Cheers
soundcheck
Level 2
Level 2
 
Posts: 57
Joined: Mon Mar 02, 2009 2:53 pm

Re: boot device mixup - please help !

Postby soundcheck on Sun Apr 05, 2009 6:34 am

I think I found a starting point for the automated backups.

If I label every single partition I can identify the device vol_id --label /dev/sdx (limitation AFAIK not all fs-types are suported)
The labels are probably easier to manage than the UUIDs.

Code: Select all
DEV=sda
PARTITION=1
LABEL=MINT

test $(vol_id --label /dev/$DEV/$PARTITION) = $LABEL && BACKUPDEVICE=/dev/$DEV

soundcheck
Level 2
Level 2
 
Posts: 57
Joined: Mon Mar 02, 2009 2:53 pm


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 12 guests