Originally posted by Qqmike
Announcement
Collapse
No announcement yet.
Grub Noob
Collapse
This topic is closed.
X
X
-
Re: Grub Noob
Why would I need to, its just a title, or is it just a blank menu option that does nothing, but is there to seperate?
- Top
- Bottom
-
Re: Grub Noob
You didn't count
title Other operating systems:
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
my set up is just as described 4
but if yours differs you can always edit and change to 3 if needed.
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
title Ubuntu 7.10, kernel 2.6.22-14-generic 0
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=1dd3fcfb-ea21-4272-a9e8-1ce3866641c8 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode) 1
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=1dd3fcfb-ea21-4272-a9e8-1ce3866641c8 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, memtest86+ 2
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
### 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/hdc1
title Microsoft Windows XP Professional 3
root (hd1,0)
Wouldnt it be 3?
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
So, you just need to edit menu.lst so that XP is the default OS that boots if you don't touch any key.
Counting the lines that start with
title
XP is the 4th, where counting starts from zero and we count also the line “title Other operating systems.”
So, change default line to read
default 4
(it's a line near the top of menu.lst).
You can open menu.lst as root as follows:
Konqueror
type
/
in the location window and press Enter;
click boot
click grub
right-click menu.lst
Actions > Edit as root
Do the edit, then File > Save and File > Quit.
Exit out to test it.
Edit
btw, No, there's nothing personal in your menu.lst at all; one could edit their menu.lst to contain personal, quirky stuff, but the standard menu.lst is generic and vanilla flavored. I don't know anyone who uses the password feature mentioned.
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
So I just got onto my Linux/XP Machine and when I booted it gave a prompt and said to run fsck, so I did, then lots of errors came up, I basically held the enter button to fix them, so many came up I thought something was corrupted, when it was done I got the prompt and pressed CTRL+ALT+Delete and it said something about the X Server, but I cold booted and here I am now typing this. I recently opened up my machine, disconnected all the hard drives and reconnected them to make sure I had good connections. I dunno if thats anything to do with it... It appers to work now......
Anyways, what you are saying is to edit the /boot/grub/menu.lst with a text editor in root mode? Here is mine (there isnt any personal info there is there?)
Whats this about a password?
# 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'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color 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 specific 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_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=1dd3fcfb-ea21-4272-a9e8-1ce3866641c8 ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## 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
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) 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
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=1dd3fcfb-ea21-4272-a9e8-1ce3866641c8 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=1dd3fcfb-ea21-4272-a9e8-1ce3866641c8 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
### 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/hdc1
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
The MBR is not part of the file system. That's why the function dd is used to “copy” it (whereas cp is a file system command). It is the first 512-byte sector of a drive (hard drive or flash drive). It's contents is as I described in the post above and contains some bootloader code (446 bytes), a partition table (64 bytes = four 16-Byte parts, one for each primary partition), and two-bytes for a hexadecimal signature or end-of-file code 55 AA. The 446-byte bootloader code is the IPL = Initial Program Loader code. There will also be more bootloader code elsewhere (following the MBR and/or in the boot sector and/or following the boot sector).
The boot sector is the first sector (= 512 Bytes) of the OS partition.
Booting, How To Multi-Boot Operating Systems:
http://www.vsubhash.com/writeups/multiboot_os.asp
(Very informative in general about booting, MBR, bootloaders, and booting)
MBR Making sense of the dd MBR printout (and follow ALL of Starman's links re MBR/boot sectors): http://www.geocities.com/thestarman3/asm/mbr/GRUB.htm
GRUB, how it fits into the HDD layout on a PC: http://www.pixelbeat.org/docs/disk
GRUB, Introductory Tutorial, by Wayne Marshall http://www.linuxjournal.com/article/4622
And I think Herman has done some stuff on MBR (his GRUB work is a standard reference now)
Bigpond, home: http://users.bigpond.net.au/hermanzone/
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
What is the MBR, the boot sector? Is it part of the file system?
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
not exactly
GRUB Stage_1 IPL goes into the first 446 bytes of the MBR (+ 64 B for partition table + a 2-Byte signature AA 55 = 512 B = first sector = the MBR); then, in another 15 sectors following the MBR (or is that 17?), goes Stage_1.5, all within the first normally vacant 63 sectors; Stage_1.5 points at Stage_2 which is located in the boot sector of the Kubuntu/Linux partition (or in a boot partition or in a dedicated GRUB partition) and contains lots of code and the menu.lst.
I'm still not sure what the goal here is; if you want a bibliography on this stuff (how GRUB works), please post, and I'll put one together for you should you just want to learn more about it (for fun ... ).
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
The menu.lst file gets copied to the mbr along with the grub binary stub when you do update-grub.Originally posted by RealG187but the menu.lst file is on the linux partition and drive...
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
Hi RealG187, I think you need to tell us what's on your mind—what are your goals here, how can we help? Fact is, GRUB is a bootloader and it overwrote your MBR where the XP bootloader used to live. The XP bootloader is gone. To restore it, use your XP CD. For a full and lucid explanation of how GRUB's stages work, see the GRUB Manual:
GRUB, GNU GRUB Manual 0.97 at: http://www.gnu.org/software/grub/manual/
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
but the menu.lst file is on the linux partition and drive...
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
In a word and put simply: no.
Grub is just a boot loader. and resides in the MBR (master Boot Record) of the first partition on the first disk (or wherever you put it). It does not "start"=boot linux unless you tell it to.
It just sits there waiting for you to tell it what to do.
What it does do is read the menu.lst file so it knows what to do.
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
I think I am using Ubuntu on there with Gnome, I have yet to install KDE.
SO what happens is, even when I boot Windows, I deal with Linux? So it boots up linux to start grub then loads windows from there, so the changes are made in Linux?
- Top
- Bottom
Leave a comment:
-
Re: Grub Noob
Just figured I'd mention that you start counting from 0.Originally posted by rodhNOTE: the last line is the important one, typically windows will be 4 so you would change the 0 to a 4 in the last line.
- Top
- Bottom
Leave a comment:
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.
Leave a comment: