View Single Post
Old 12-14-2007, 10:14 AM   #9
Ray Jones
@Ray Jones
Ray Jones's Avatar
Join Date: Jun 2003
Location: digital
Posts: 8,302
10 year veteran!  LF Jester  Helpful!  Forum Veteran 
Originally Posted by Astrotoy7
>how do you launch linux with no bootloader
You mean install? Easy, usually every distro's installer asks you whether to install GRUB/LILO/nothing.

>will this launch into linux by default , how can you change the default OS
No, it will not lauch linux at all.

Two ways, change the order of OS entries in the menu.lst file, or change [number] in the default [number] line in the menu.lst (starts counting at 0) to select your preferred entry. It is also possible to always select the last booted entry, have a default entry in case of system failure.

>what distros will it work on. eg. any that use GRUB, like ubuntu
Let's say, expect it to do so. ^^

>How exactly do you get to/edit the menu.lst file
Windows? It should be in C:\boot\grub\, complete with nice commentary for the unknowing.

>what are you meant to be looking for when you say "take note of the contents of /boot" can you give an example
When you've installed Linux, the kernel and initrd files are in /boot, to list it's contents grab a console and type
ls -al /boot. It should give you something like my crap SuSE Linux at work does
drwxr-xr-x  3 root root    4096 11. Okt 08:33 .
drwxr-xr-x 22 root root    4096 14. Dez 09:47 ..
-rw-------  1 root root     512 12. Dez 2006  backup_mbr
lrwxrwxrwx  1 root root       1 12. Dez 2006  boot -> .
-rw-r--r--  1 root root   64134  3. Okt 01:49 config-
drwxr-xr-x  2 root root    4096 11. Okt 08:33 grub
lrwxrwxrwx  1 root root      27 11. Okt 08:33 initrd -> initrd-
-rw-r--r--  1 root root 3151967 11. Okt 08:33 initrd-
-rw-r--r--  1 root root  369152  9. Mai 2007  message
-rw-r--r--  1 root root   86462  3. Okt 01:51 symsets-
-rw-r--r--  1 root root  338740  3. Okt 01:51 symtypes-
-rw-r--r--  1 root root   99320  3. Okt 01:51 symvers-
-rw-r--r--  1 root root  954130  3. Okt 01:43
-rwxr-xr-x  1 root root 2114978  3. Okt 01:49 vmlinux-
lrwxrwxrwx  1 root root      28 11. Okt 08:32 vmlinuz -> vmlinuz-
-rw-r--r--  1 root root 1618384  3. Okt 01:44 vmlinuz-
We're interested in the vmlinuz* and initrd* files (with vmlinuz being the kernel image, and initrd being something like just more awesome to make your kernel happy). So what yo must take note of is the names of the vmlinuz/initrd files you would like to boot into.

In that example we want vmlinuz- and initrd- so the menu.lst lines would be something like
title openSUSE 10.2 -
    root (hd0,1)
    kernel /boot/vmlinuz-
    initrd /boot/initrd-
The root line simply tells GRUB which (harddrive,partition) and boot directory to use.

For a complete documentation of GRUB and the menu.lst, you should consider reading the GRUB manual, 'cause I don't feel like copy&paste.

In the directory listing above you may notice some lines starting with an "l".
These are actually links pointing at some file, in this case vmlinuz/initrd are pointing to the actual kernel/initrd (and are changed accordingly with any kernel update/install). This a common technique in Linux, so you can actually almost rely on that. An almost idiot proof menu.lst entry would be
    root (hd0,1)
    kernel /boot/vmlinuz
    initrd /boot/initrd
But remember this will always attempt boot the last installed kernel version.

>what are the advantages of doing it this way
In jay's case, it downloads porn. In my case too, but different porn. Also, you can painlessly configure it to boot from USB stick or HDD, or to download even moar porn for you. And you can edit the menu entries while in the boot menu, so basically typos won't render your system unbootable. It's theme-able. And yes, there are GUIs available to manage GRUB.


Whenever you install (a "native" Linux) GRUB onto some harddisk, just make sure you do not install GRUB onto some partition, but always into the MBR of the HDD itself.

Most distro's installers I know do ask where to install GRUB and the default choice is often the correct one (except you want to boot from an USB HDD or whatever). This is what cause much trouble when not done so (I must know ^^). The point is that way you make sure you do not overwrite any bootsectors of any partition of that HDD, and thus you make sure any possible Windows installation has everything it wants where it needs it on its partition.

When you keep that in mind, it almost does not matter what you do install first, Linux, Windows, err DOS?

However, the critical thing *is* the MBR. The MBR basically contains nothing but info about where to go first. (And in case you install GRUB there, GRUB too)
It is simply the very first sector of any drive out there. Every HDD and PC goes and looks into the MBR where to go next.

Anyway, in case you want to get rid of (Linux') GRUB, there are several ways to accomplish this, one is using a Windows XP installation CD, its rescue mode (A CONSOLE btw), and the FIXMBR command. Or you can backup that MBR in Linux *before* installing GRUB, for a later restore.

In case you want to reinstall GRUB, just take some Linux Live/Install CD and do what the GRUB manual tells you.

Last edited by Ray Jones; 12-14-2007 at 10:46 AM.
Ray Jones is offline   you may: