SliTaz SliTaz Forum

You are not logged in.

#1 2012-10-01 13:38:53

gap
Member
Registered: 2012-09-01
Posts: 33

editing grub menu.lst

I need to dual boot.  I can't figure out how to edit the menu list to reflect my other distro.  This is my fdisk -l.

Disk /dev/sda: 320.0 GB, 320072933376 bytes

255 heads, 63 sectors/track, 38913 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System

/dev/sda1               1       29029   233174016  83 Linux

/dev/sda3           29030       38914    79394817   5 Extended

/dev/sda5           29030       38401    75274240  83 Linux

/dev/sda6           38401       38914     4119552  82 Linux swap

These are my partitions

/dev/sda1 which I believe is my slitaz partition

/dev/sda5 which is the other distro

here is a copy of my current grub menu.lst.  you can see where i've attempted to add in the correct information with no luck

# For booting SliTaz from : /dev/sda1

#

title SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.37-slitaz)

root (hd0,0)

kernel /boot/vmlinuz-2.6.37-slitaz root=/dev/sda1 quiet

title Ubuntu

root (hd0,5)

kernel /media/disk/boot/vmlinuz-3.2.0-31-generic root=/dev/sda5 quiet

also:

i noticed there is grub V2 out.  is it smart to upgrade to grub 2 or to keep the current grub?

Offline

#2 2012-10-01 14:06:54

yiumun
Member
Registered: 2012-09-29
Posts: 10

Re: editing grub menu.lst

I believe you should change root (hd0,5) to root (hd0,4). It should work.

Offline

#3 2012-10-01 14:12:02

michaelbischof
Member
Registered: 2012-01-20
Posts: 536

Re: editing grub menu.lst

I find Grub2 more complicated. At least it will take some time to learn to work with it. Editing the menu.lst is less easy in my experience.

Offline

#4 2012-10-01 14:15:33

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: editing grub menu.lst

Also, Ubuntu requires an initrd command similar to

initrd    /boot/initrd.img-3.2.0-31-generic-pae

- you would need to change the file name to suit your installation.

Offline

#5 2012-10-01 14:28:11

gap
Member
Registered: 2012-09-01
Posts: 33

Re: editing grub menu.lst

There are 3

[attachment=16781,677]

Offline

#6 2012-10-01 15:27:36

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: editing grub menu.lst

Hi gap on your ubuntu have three kernel update, I think the last is correct and try this menu.lst

title SliTaz GNU/Linux (Kernel 2.6.37-slitaz)

root (hd0,0)

kernel /boot/vmlinuz-2.6.37-slitaz root=/dev/sda1 quiet

title Ubuntu

root (hd4,0)

kernel /boot/vmlinuz-3.2.0-31-generic root=/dev/sda5 quiet

initrd /boot/initrd.img-3.2.0-31-generic

or change version 3.2.0-31 on another two version you have

Offline

#7 2012-10-01 17:31:32

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: editing grub menu.lst

Sorry I have fact an little mistake, ubuntu menu is

title Ubuntu

root (hd0,4)

kernel /boot/vmlinuz-3.2.0-31-generic root=/dev/sda5 quiet

initrd /boot/initrd.img-3.2.0-31-generic

Offline

#8 2012-10-01 19:53:14

gap
Member
Registered: 2012-09-01
Posts: 33

Re: editing grub menu.lst

Yeah, I cought the error myself and moved it and it worked, so thank you for your assistence smile

Can you explain how the process works?

The root is on the primary hard drive, 4th partition (how is it the 4th?)

the kernel is pointing toward a kernel in the file system?

What is initrd?

Offline

#9 2012-10-01 22:07:57

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: editing grub menu.lst

Hi gap,

GRUB uses next name translations:

hda* - (hd0,*)

hdb* - (hd1,*)

...

hda1 - (hd0,0)

hda2 - (hd0,1)

...

hda5 - (hd0,4)

...

Why? GRUB is for GRand Unified Bootloader and it can boot not only Linux. So it not link disk (partitions) names neither with Linux or Windows names. It uses its own ones.

InitRD is for Initial RAMDisk, virtual disk with programs that loads to RAM while booting. How it works in the traditional big Linuxes? It contains very small Linux system that helps to big system to boot. Usually it contain busybox environment and drivers for various filesystems to boot big linux from.

But, small Linux distros like SliTaz, Puppy or TinyCore completely contained in the initrd.

Offline

#10 2012-10-02 15:06:32

gap
Member
Registered: 2012-09-01
Posts: 33

Re: editing grub menu.lst

Thank you for your help.  I learned something new today smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.021 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]