LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Squeeze and UUID (https://www.linuxquestions.org/questions/debian-26/squeeze-and-uuid-820033/)

CloudyWizzard 07-15-2010 02:13 PM

Squeeze and UUID
 
Hi all,

I just upgraded from Lenny to Squeeze and during installation I got a message about some fstab entry that manually needs to be modified (IIRC).

After finishing the upgrade the system seems to work well though, but now when I try to run "apt-get autoclean" it wants to remove memtest86+ but it fails everytime :
Quote:

error: cannot open `/dev/sdc' while attempting to get disk size.
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
dpkg: error processing memtest86+ (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
memtest86+
E: Sub-process /usr/bin/dpkg returned an error code (1)
my fstab has the following :
Quote:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/Debian--Mobile-root / ext3 errors=remount-ro 0 1
# /dev/sda1 /boot ext2 defaults 0 2
UUID=f011d901-f300-44b5-a406-93d060621c02 /boot ext2 defaults 0 2
/dev/mapper/Debian--Mobile-swap_1 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
as I understand the drive it's looking for "/" (the root one ??) is called /dev/dm-0 (I'm using LVM) and /dev/dm-1 is the swap ?

I tried to lookup the UUID but then what ?

these are some of the commands that I found online but that's not enough for me to understand what I need to do.

Quote:

Debian-Mobile:/home/patrick# blkid /dev/dm-0
/dev/dm-0: UUID="2436b75a-c976-4963-9ba4-9e76d9843f89" TYPE="ext3"
Quote:

Debian-Mobile:/home/patrick# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jul 15 16:57 2436b75a-c976-4963-9ba4-9e76d9843f89 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jul 15 16:58 f011d901-f300-44b5-a406-93d060621c02 -> ../../sda1
can I just replace :
Code:

/dev/mapper/Debian--Mobile-root /              ext3    errors=remount-ro 0      1
in fstab with
Code:

UUID=2436b75a-c976-4963-9ba4-9e76d9843f89        /                ext3        error=remount-ro        0        1
or will that cause problems ? (like being unable to boot ?

I also use Grub2 incase that's important

Hope someone can provide some assistance.

AlucardZero 07-15-2010 03:47 PM

Ok, your error is a grub update error. Is /dev mounted? Post the output of "mount" and "fdisk -l".

CloudyWizzard 07-16-2010 12:51 AM

Quote:

Originally Posted by AlucardZero (Post 4034490)
Ok, your error is a grub update error. Is /dev mounted? Post the output of "mount" and "fdisk -l".

the output of mount :
Quote:

patrick@Debian-Mobile:~$ mount
/dev/mapper/Debian--Mobile-root on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda1 on /boot type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sr0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=patrick)
and fdisk -l
Quote:

patrick@Debian-Mobile:~$ sudo fdisk -l
[sudo] password for patrick:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x92ad3af7

Device Boot Start End Blocks Id System
/dev/sda1 * 1 31 248976 83 Linux
/dev/sda2 32 38913 312319665 8e Linux LVM

Disk /dev/dm-0: 317.1 GB, 317093576704 bytes
255 heads, 63 sectors/track, 38551 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2717 MB, 2717908992 bytes
255 heads, 63 sectors/track, 330 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
I did some more searching and from what I found this seems to be a bug in this version of Grub2 (my current version is 1.98-1) the version of grub2 in SID "should" fix the problem but I guess I cannot just install that version (not only because DPKG is not willing to do anything before fixing the Memtest86+ issue but probably also some dependencies that could cause some problems ??)

Tnx

craigevil 07-16-2010 01:48 AM

Replace with the correct UUID in fstab then run update-grub

CloudyWizzard 07-16-2010 10:41 AM

Quote:

Originally Posted by craigevil (Post 4034924)
Replace with the correct UUID in fstab then run update-grub

So I replace :

Code:

/dev/mapper/Debian--Mobile-root /              ext3    errors=remount-ro 0      1
with
Code:

UUID=2436b75a-c976-4963-9ba4-9e76d9843f89        /                ext3        error=remount-ro        0        1
do I need to reboot or something like that since I tried changing this and then running update-grub but it gives the same error.

Quote:

Debian-Mobile:/home/patrick# update-grub
error: cannot open `/dev/sdc' while attempting to get disk size.
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
I'm holding back on rebooting with the changed fstab since I don't want to end-up with a broken system that doesn't boot.

craigevil 07-16-2010 01:54 PM

Take a look at http://www.cyberciti.biz/faq/linux-f...-update-fstab/

Also check the Debian BTS for that grub error:
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?)

I do not use raid or lvm so my advice might be incorrect.

my fstab
Code:

# /etc/fstab - static information about the filesystems - fstab(5)
#
# /etc/fstab is only read by programs, and not written; it is the duty of the
# system administrator to properly maintain this file.
#
# Instead  of giving the device explicitly, one may indicate the filesystem
# that is to be mounted by its UUID or VOLUME label. This will make the
# system more robust: adding or removing a disk changes the disk device name
# but not the filesystem UUID or VOLUME label.
#
# <filesystem>        <mountpoint>        <type>                <options>        <dump>        <pass>

# automatically added, WDC_WD1600JS-75N-WD-WCANMF031969-part2, /dev/sda2
UUID=5603c42b-2d73-4b60-a954-ad232cf5c0de        /        ext3        defaults,noatime,errors=remount-ro        0        1

# automatically added, WDC_WD1600JS-75N-WD-WCANMF031969-part1, /dev/sda1, LABEL=DellUtility
/dev/disk/by-uuid/07D7-0508        /media/disk0        vfat        noauto,users,exec,shortname=lower,quiet,umask=000        0        0

# automatically added, WDC_WD1600JS-75N-WD-WCANMF031969-part4, /dev/sda4, LABEL=Swap
UUID=f4900aaa-31e6-4531-8f64-2e9bfe096bf3        none        swap        sw        0        0

# automatically added, WDC_WD1600JS-75N-WD-WCANMF031969-part5, /dev/sda5, LABEL=Backup
UUID=43309b15-bcf2-42f3-b2a5-73b6470ed0b3        /media/disk2        ext3        defaults,noatime,errors=remount-ro        0        1

# automatically added, PHILIPS_DVD+-RW_DVD8801_VA155S61665391
#/dev/cdrom        /media/cdrom        udf,iso9660        user,noauto        0        0

# automatically added, SONY_DVD-ROM_DDU1615
#/dev/cdrom1        /media/cdrom1        udf,iso9660        user,noauto        0        0

# temporary filesystem in virtual memory
tmpfs        /tmp        tmpfs        defaults        0        0

my grub.cfg
Code:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
if terminal_output gfxterm ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal gfxterm
fi
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.34-1.dmz.2-liquorix-686' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        echo        'Loading Linux 2.6.34-1.dmz.2-liquorix-686 ...'
        linux        /boot/vmlinuz-2.6.34-1.dmz.2-liquorix-686 root=UUID=5603c42b-2d73-4b60-a954-ad232cf5c0de ro ipv6.disable=1 quiet nomodeset
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.34-1.dmz.2-liquorix-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.34-1.dmz.2-liquorix-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        echo        'Loading Linux 2.6.34-1.dmz.2-liquorix-686 ...'
        linux        /boot/vmlinuz-2.6.34-1.dmz.2-liquorix-686 root=UUID=5603c42b-2d73-4b60-a954-ad232cf5c0de ro single ipv6.disable=1
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.34-1.dmz.2-liquorix-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        echo        'Loading Linux 2.6.32-5-686 ...'
        linux        /boot/vmlinuz-2.6.32-5-686 root=UUID=5603c42b-2d73-4b60-a954-ad232cf5c0de ro ipv6.disable=1 quiet nomodeset
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        echo        'Loading Linux 2.6.32-5-686 ...'
        linux        /boot/vmlinuz-2.6.32-5-686 root=UUID=5603c42b-2d73-4b60-a954-ad232cf5c0de ro single ipv6.disable=1
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.32-5-686
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        linux16        /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        linux16        /boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        multiboot        /boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos2)'
        search --no-floppy --fs-uuid --set 5603c42b-2d73-4b60-a954-ad232cf5c0de
        multiboot        /boot/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Dell Utility Partition (on /dev/sda1)" {
        insmod part_msdos
        insmod fat
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set 07d7-0508
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


CloudyWizzard 07-17-2010 08:59 AM

Thanks.

The solution for my problem seemed to be some bug in that version of Grub, the problem was solved by installing grub-common and grub-pc from SID and then running update-grub.


All times are GMT -5. The time now is 02:03 PM.