Grub: cleaning menu.lst

I would like to clean-up /boot/grub/menu.lst , not because something is going wrong right now, but because I fear it could be messed when Yast updater will rebuild it after the next kernel update.

  1. I have 2 entries to boot the openSUSE 11.3 system (well, 4 with the failsafe variants). One is “generic” and refers to /boot/vmlinuz , the other one is “kernel specific” and refers to /boot/vmlinuz-2.6.34.7-0.7-default .
    vmlinuz is a soft link to vmlinuz-2.6.34.7-0.7-default , so both grub entries are just doing the same thing.
    If I remove one (useless) entry, which one should I better keep ? The “Generic” or the “kernel specific” one ?

  2. The main openSUSE 11.3 entry has the option: “resume=/dev/disk/by-id/scsi-1QUANTUM_361909031726-part3”.
    That disk does not exist anymore. Can I just remove that option, or should I better replace it ? (with what ?)

Here are the details:


Linux1:~ # cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on Tue Jan  4 06:40:51 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,4)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3 - 2.6.34.7-0.7
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-Maxtor_6Y080P0_Y2V3PWZE-part5 resume=/dev/disk/by-id/scsi-1QUANTUM_361909031726-part3 splash=silent quiet showopts
    initrd /boot/initrd-2.6.34.7-0.7-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.34.7-0.7
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-Maxtor_6Y080P0_Y2V3PWZE-part5 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
    initrd /boot/initrd-2.6.34.7-0.7-default

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3
    root (hd0,4)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-Maxtor_6Y080P0_Y2V3PWZE-part5    resume=/dev/disk/by-id/scsi-1QUANTUM_361909031726-part3 splash=silent quiet showopts
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Disquette
    rootnoverify (fd0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3
    root (hd0,4)
    kernel /boot/vmlinuz root=/dev/disk/by-id/ata-Maxtor_6Y080P0_Y2V3PWZE-part5 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: data1###
title openSUSE 11.3 - Install disk
    kernel (hd0,2)/boot/i386/loader/linux splash=silent showopts
    initrd (hd0,2)/boot/i386/loader/initrd


Linux1:~ # fdisk -l

Disk /dev/sdb: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 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: 0x000740a7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         901     7237251    b  W95 FAT32
/dev/sdb2             902        2860    15735667+  1c  Hidden W95 FAT32 (LBA)
/dev/sdb3            2861        3643     6289447+  83  Linux
/dev/sdb4   *        3644        9965    50780160    f  W95 Ext'd (LBA)
/dev/sdb5            3644        6172    20304896   83  Linux
/dev/sdb6            6172        9886    29832705   83  Linux
/dev/sdb7            9886        9963      624640   82  Linux swap / Solaris


Linux1:~ # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb5              20G  3.7G   15G  21% /
devtmpfs              377M  228K  377M   1% /dev
tmpfs                 377M  228K  377M   1% /dev/shm
/dev/sdb6              29G  3.9G   23G  15% /home
/dev/sdb1             6.9G  2.1G  4.9G  31% /windows/C

  1. you could delete the symlink version (item 3 /boot/vmlinuz etc). I’ve heard that there’s a bug in the bootloader updater associated with symlink entries.
  2. replace 3 with 7 as in resume=/dev/disk/by-id/scsi-1QUANTUM_361909031726-part7

Ok, thanks.

You meant: /dev/disk/by-id/ata-Maxtor_6Y080P0_Y2V3PWZE-part7 ?
That is now the swap partition (thanks to your advice :slight_smile: )

Side question:
As I understand, the resume option is to define a place on disk where to store the RAM content in case, eg., of a suspend-to-disk, right ?
So, the swap disk must be at least the same size as the RAM ??

yes, that looks a bit better :slight_smile:

Don’t know much about this so I got this from Google:

Grub has no role in the suspend-to-RAM/resume-from-RAM-suspend process.

Grub has a role to play in the resume-from-hibernation process: it loads the kernel, which then finds a system image in the swap partition and resumes it

So It has naught to do with ram by the looks of things. However if you allow hibernation, you need a swap partition big enough to take the image, and I couldn’t say how big that is.

I don’t use the hibernate feature.
I have 768Mb RAM, and now a swap disk of 610Mb. As I spent 3-4 days without any swap and have not encountered any problem, I’m confident that the swap disk size is enough for my system.

Thanks again for your help.