Matt Posted May 19, 2006 Report Share Posted May 19, 2006 Well! I finally got Debian up and running. I've been roaming around a bit, checking things out. I'm not sure yet if I like this or Ubuntu better, but its most definately too early (especially for a beginner like myself) to make that decision...Anyway... the first thing I'd like to do is edit grub so that Windows is the default OS and Windows would be the one loaded after 10 seconds if no choice is selected. The reason is this is a familty computer, and I will be the only one booting into linux. Wanna make it easier for everyone else. I've done this before, but I couldn't find a post about it. I remember editing some file, lol but have know idea where it is or how to do it.Thanks all! Matt Quote Link to post Share on other sites
jimras Posted May 19, 2006 Report Share Posted May 19, 2006 I think the file that you have to edit is the grub.lst fileOnce you open it, you should be able to figure out where tocut and paste so that Windows is the first loaded. Quote Link to post Share on other sites
Matt Posted May 19, 2006 Author Report Share Posted May 19, 2006 mmm well I dont know where that file it, lol and as I recall it was rather complicated... Quote Link to post Share on other sites
shanenin Posted May 19, 2006 Report Share Posted May 19, 2006 (edited) First off you may or may not have to mount your /boot partition. to see if it is mounted already type this command into your terminalshane@mainbox ~ $ mount/dev/hda1 on / type ext3 (rw,noatime)proc on /proc type proc (rw)sysfs on /sys type sysfs (rw)udev on /dev type tmpfs (rw,nosuid)devpts on /dev/pts type devpts (rw)/dev/hdb4 on /mnt/media type ext3 (rw,noatime)shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)usbfs on /proc/bus/usb type usbfs (rw)nfsd on /proc/fs/nfs type nfsd (rw)rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)/dev/hda2 on /boot type ext2 (rw,noatime)see the very last line in the output, that shows that the /boot partition is mounted. If you do not have a line that contains "/boot" you will need to mount it. You can do that with the mount commandmount /bootnow you can use any text editer to edit the file. I like nano myselfnano -w /boot/grub/menu.lstthe above code will use the program nano(text editer like notepad) to open the file so you can edit it. You may not have nano installed. I am not sure what editers come witha defualt install of debian. Edited May 19, 2006 by shanenin Quote Link to post Share on other sites
Matt Posted May 19, 2006 Author Report Share Posted May 19, 2006 Ok, mine wasn't mounted. When I type that command I get cpe-24-210-251-48:/# mount /bootmount: can't find /boot in /etc/fstab or /etc/mtabI'm in root. Am I doing something wrong? Quote Link to post Share on other sites
shanenin Posted May 19, 2006 Report Share Posted May 19, 2006 (edited) I kind of gave you bad advice. I assumbed that you had /boot on a seperate partition(not all distros do that). The reason it told you /boot was not in /etc/fstab is because you do not have a seperate /boot partition. So you can ignore most of my advice and just edit the file/boot/grub/menu.lst Edited May 19, 2006 by shanenin Quote Link to post Share on other sites
Matt Posted May 19, 2006 Author Report Share Posted May 19, 2006 Will do. Would like some guidance though. I know I have to change the number next to defaul from 0, but what do I change it to? 4?And since it opens in the terminal, will it save just by me exiting?ThanksMatt Quote Link to post Share on other sites
shanenin Posted May 19, 2006 Report Share Posted May 19, 2006 I know I have to change the number next to defaul from 0, but what do I change it to? 4?I guess it would kind of depend, I could tell you exactly if I could see your current configuration of your file. The cat command it good for thiscat /boot/grub/menu.lstAnd since it opens in the terminal, will it save just by me exiting?That depends on which editor you are using. if you are using nano, <ctrl>x will save your file Quote Link to post Share on other sites
Matt Posted May 19, 2006 Author Report Share Posted May 19, 2006 ok, here's the cat command output:matt@cpe-24-210-251-48:~$ cat /boot/grub/menu.lst# menu.lst - See: grub(8), info grub, update-grub(8)# grub-install(8), grub-floppy(8),# grub-md5-crypt, /usr/share/doc/grub# and /usr/share/doc/grub-doc/.## default num# Set the default entry to the entry number NUM. Numbering starts from 0, and# the entry number 0 is the default if the command is not used.## You can specify 'saved' instead of a number. In this case, the default entry# is the entry saved with the command 'savedefault'.default 0## timeout sec# Set a timeout, in SEC seconds, before automatically booting the default entry# (normally the first entry defined).timeout 5# Pretty colourscolor cyan/blue white/blue## password ['--md5'] passwd# If used in the first section of a menu file, disable all interactive editing# control (menu entry editor and command-line) and entries protected by the# command 'lock'# e.g. password topsecret# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/# password topsecret## examples## title Windows 95/98/NT/2000# root (hd0,0)# makeactive# chainloader +1## title Linux# root (hd0,1)# kernel /vmlinuz root=/dev/hda2 ro### Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST### BEGIN AUTOMAGIC KERNELS LIST## lines between the AUTOMAGIC KERNELS LIST markers will be modified## by the debian update-grub script except for the default options 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## should update-grub create memtest86 boot option## e.g. memtest86=true## memtest86=false# memtest86=true## ## End Default Options ##title Debian GNU/Linux, kernel 2.4.27-2-386root (hd1,1)kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hdb2 roinitrd /boot/initrd.img-2.4.27-2-386savedefaultboottitle Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)root (hd1,1)kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hdb2 ro singleinitrd /boot/initrd.img-2.4.27-2-386savedefaultboot### END DEBIAN AUTOMAGIC KERNELS LIST# This is a divider, added to separate the menu items below from the Debian# ones.title Other operating systems:root# This entry automatically added by the Debian installer for a non-linux OS# on /dev/hda2title Microsoft Windows XP Home Editionroot (hd0,1)savedefaultmakeactivechainloader +1BTW, when i just type /boot/grub/menu.lst It says permission denied (in root and non root) Quote Link to post Share on other sites
shanenin Posted May 19, 2006 Report Share Posted May 19, 2006 (edited) Since windows is the forth one down in the list, you would change the default to 3 (start counting with zero 0,1,2,3)if you just type /boot/grub/menu.lstthe above command is trying to execute the file menu.lst. Since it is not an executable file it is telling you permission denied. you will need to open the file with an editor like thisnano -w /boot/grub/menu.lst Edited May 19, 2006 by shanenin Quote Link to post Share on other sites
Matt Posted May 19, 2006 Author Report Share Posted May 19, 2006 Thanks shane! I'm off to bed for the night, but get ready for some more questions tomorrow! Thanks again,Matt Quote Link to post Share on other sites
shanenin Posted May 19, 2006 Report Share Posted May 19, 2006 (edited) your welcome :-)edit added later//here is my menu.lst. If you removed most of your comments, yours would look neater. That is hardly nessesaryshane@mainbox ~ $ cat /boot/grub/menu.lstdefault 0timeout 5title=gentooroot (hd0,1)kernel (hd0,1)/bzImage root=/dev/hda1title=gentoo-oldroot (hd0,1)kernel (hd0,1)/bzImage.gentoo_old root=/dev/hda5title=ubunturoot (hd0,5)kernel (hd0,5)/boot/vmlinuz-2.6.15-21-386 root=/dev/hda6initrd (hd0,5)/boot/initrd.img-2.6.15-21-386 Edited May 19, 2006 by shanenin Quote Link to post Share on other sites
hitest Posted May 20, 2006 Report Share Posted May 20, 2006 Well! I finally got Debian up and running. I've been roaming around a bit, checking things out. I'm not sure yet if I like this or Ubuntu better, but its most definately too early (especially for a beginner like myself) to make that decision...Very cool, congratulations, Matt! I ran Debian for a month or so and liked it a lot. I've gone back to running Ubuntu on one of my Linux boxes ( I'm running Slackware on my other boxes). I found that Debian lacked a bit in hardware support ( for me anyway). With Ubuntu I get great debian package management and excellent hardware support.Debian is an exceptional distro! The penguin rules!! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.