Originally Posted by
grahammechanical
Yes, I have done that. I do not have a Windows OS. So, I do not have the same need as you. I choose one of my installed Ubuntus as the default install and if a new Ubuntu install over-writes Grub, I simply boot into my default Ubuntu and run
Code:
sudo grub-install /dev/sda
and my default install is back in charge. I have done just a little study of Grub and I appreciate the work that you have done.
Regards.
Thank you!
That is exactly what I do too. You must be aware also that a new Ubuntu install pulls in all of the swapfiles into /etc/fstab and needs editing.
As well as a re-install as it will not only leave multiple swapfiles but, ext4 entries as well. It will retain where the ext4 was as well as where it is now installed.
So, even though you don't use windows, if you choose a default Ubuntu other than the 1st one you could still benefit from a /etc/grub.d/06_custom file.
How often do you use memtest or an older kernel than the most recent one?
I think it is nice that they came up with sub menus but, I never need an older kernel and if I did I could just change it so I could see them.
Here is mine in Raring (Grub 2.00) with my custom installs in it. I have one Lucid with a custom Grub and a Lucid with a generic Grub, etc.
That is why I labelled them like that. But, what you put between the quotes after the menuentry is totally up to you as you will be the only one to see it.
Code:
#!/bin/sh
echo 1>&2 "Adding Ubuntu Lucid Lynx 10.04, Precise Pangolin 12.04, Quantal Quetzal 12.10, Raring Ringtail 13.04 and Windows 7"
exec tail -n +4 $0
# 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.
menuentry "Lycid Lynx 10.04" {
set root=(hd0,2)
linux /vmlinuz root=/dev/sda2 ro quiet splash
initrd /initrd.img
}
menuentry "Lycid Lynx 10.04 (Recovery Mode)" {
set root=(hd0,2)
linux /vmlinuz root=/dev/sda2 ro single
initrd /initrd.img
}
menuentry "Lycid Lynx Generic 10.04" {
set root=(hd0,9)
linux /vmlinuz root=/dev/sda9 ro quiet splash
initrd /initrd.img
}
menuentry "Lycid Lynx Generic 10.04 (Recovery Mode)" {
set root=(hd0,9)
linux /vmlinuz root=/dev/sda9 ro single
initrd /initrd.img
}
menuentry "Precise Pangolin 12.04" {
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro quiet splash
initrd /initrd.img
}
menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro recovery nomodeset
initrd /initrd.img
}
menuentry "Precise Pangolin Generic 12.04" {
set root=(hd0,11)
linux /vmlinuz root=/dev/sda11 ro quiet splash
initrd /initrd.img
}
menuentry "Precise Pangolin Generic 12.04 (Recovery Mode)" {
set root=(hd0,11)
linux /vmlinuz root=/dev/sda11 ro recovery nomodeset
initrd /initrd.img
}
menuentry "Quantal Quetzal 12.10" {
set root=(hd0,7)
linux /vmlinuz root=/dev/sda7 ro quiet splash
initrd /initrd.img
}
menuentry "Quantal Quetzal 12.10 (Recovery Mode)" {
set root=(hd0,7)
linux /vmlinuz root=/dev/sda7 ro single
initrd /initrd.img
}
menuentry "Quantal Quetzal Generic 12.10" {
set root=(hd0,13)
linux /vmlinuz root=/dev/sda13 ro quiet splash
initrd /initrd.img
}
menuentry "Quantal Quetzal Generic 12.10 (Recovery Mode)" {
set root=(hd0,13)
linux /vmlinuz root=/dev/sda13 ro recovery nomodeset
initrd /initrd.img
}
menuentry "Raring Ringtail 13.04" {
set root=(hd0,16)
linux /vmlinuz root=/dev/sda16 ro quiet splash
initrd /initrd.img
}
menuentry "Raring Ringtail 13.04 (Recovery Mode)" {
set root=(hd0,16)
linux /vmlinuz root=/dev/sda16 ro recovery nomodeset
initrd /initrd.img
}
menuentry "Windows 7" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 1CFC7A8DFC7A60C6
chainloader +1
}
Since mine is so long, I like the fact I can copy them across partitions to save time.