On (02/12/04 09:38), john gennard wrote: > I've been using grub for a little while now, and > its setup as been 'automatic'. > > I run Sarge and also have Sid installed. > > Frequently, I install debian based distros just to > have a look at them. > > Now, I have ubuntu as the default selection and Sarge > is lower down. > > I've just installed a 2.6.8 kernel in Sarge and was > hoping the adjustment to grub would return Sarge to > the default position - it didn't. > > I can boot into ubuntu and add the new kernel, but > this would not put Sarge where I want it to be for > booting purposes. > > The man and info pages do not appear to help (perhaps > because I don't fully understand them). I don't want to > risk making everything unbootable by experimenting, so > can anyone please explain how I can safely put Sarge > back as default? Hi John
You need to edit /boot/grub/menu.lst with a text editor. I have a rather complex grub set-up (which was an interesting learning experience) on a spare windows machine in our office which has two drives /dev/hda and /dev/hdb; hda has windows 98 and hdb has a vfat partition for the windows system and 4 Debian based systems on different partitions but share common swap space. Here's an extract from my menu.lst: # This entry is for the windows OS and appears first as the default # system on /dev/hda1 title Windows 98SE root (hd0,0) savedefault makeactive chainloader +1 # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST # The automagic kernels list includes all the d-i sarge kernels which # update automatically. Note that the groot (grub root) is on the # second disk ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default optons below ## DO NOT UNCOMMENT THEM, Just edit them to your needs ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specifiv kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro # kopt=root=/dev/hdb2 ro ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd1,1) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(recovery mode) single # altoptions=(recovery mode) single ## controls how many kernels should be put into the menu.lst ## only counts the first occurence of a kernel, not the ## alternative kernel options ## e.g. howmany=all ## howmany=7 # howmany=all ## ## End Default Options ## title Debian GNU/Linux, kernel 2.6.8-1-686 root (hd1,1) kernel /boot/vmlinuz-2.6.8-1-686 root=/dev/hdb2 ro initrd /boot/initrd.img-2.6.8-1-686 savedefault boot title Debian GNU/Linux, kernel 2.6.8-1-686 (recovery mode) root (hd1,1) kernel /boot/vmlinuz-2.6.8-1-686 root=/dev/hdb2 ro single initrd /boot/initrd.img-2.6.8-1-686 savedefault boot title Debian GNU/Linux, kernel 2.4.27-1-386 root (hd1,1) kernel /boot/vmlinuz-2.4.27-1-386 root=/dev/hdb2 ro initrd /boot/initrd.img-2.4.27-1-386 savedefault boot title Debian GNU/Linux, kernel 2.4.27-1-386 (recovery mode) root (hd1,1) kernel /boot/vmlinuz-2.4.27-1-386 root=/dev/hdb2 ro single initrd /boot/initrd.img-2.4.27-1-386 savedefault boot ### END DEBIAN AUTOMAGIC KERNELS LIST # This is a divider, added to separate the menu items below from the # Debian sarge ones. Here I've manually inserted the details of Ubuntu, # and MEPIS. Note that Xandros uses LILO by default and offers # no easy way to install grub. I can only boot into Xandros from a boot # floppy. My advice is don't mix Xandros with grub ;) title Other operating systems: root # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hdb9. title Ubuntu, kernel 2.6.8.1-3-386 (on /dev/hdb9) root (hd1,8) kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hdb9 ro quiet splash initrd /boot/initrd.img-2.6.8.1-3-386 savedefault boot # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hdb9. title Ubuntu, kernel 2.6.8.1-3-386 (recovery mode) (on /dev/hdb9) root (hd1,8) kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hdb9 ro single initrd /boot/initrd.img-2.6.8.1-3-386 savedefault boot # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hdb11. title MEPIS, kernel 2.4.26 (on /dev/hdb11) root (hd1,10) kernel /boot/vmlinuz-2.4.26 root=/dev/hdb11 ro savedefault boot # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hdb11. title MEPIS, kernel 2.4.26 (recovery mode) (on /dev/hdb11) root (hd1,10) kernel /boot/vmlinuz-2.4.26 root=/dev/hdb11 ro single savedefault boot # This entry automatically added by the Debian installer for an existing # linux installation on /dev/hdb11. title Run MEMTEST to test system memory (on /dev/hdb11) root (hd1,10) kernel /boot/memtest86.bin root=/dev/hdb11 savedefault boot Once you've edited your menu.lst run update-grub but make sure you have also made a grub floppy to get you out of trouble, if necessary. Look at the GRUB in Debian HOWTO: http://www.linuxorbit.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=539 HTH Clive -- www.clivemenzies.co.uk ... ...strategies for business -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]