SliTaz SliTaz Forum

You are not logged in.

#1 2012-02-17 04:50:37

Guest
Guest

Grub not installing

I'm attempting to install SliTaz on my old PC as dual-boot with XP. I ran it from liveCD and used the installer there. As far as I can tell, it installed fine (I can see the files on the partition), but Grub does not seem to have installed correctly. It does not create menu.lst, and when I reboot it simply goes into XP. In fact, I can't find any Grub files, so I don't think it installed properly.

EDIT: I was doing the command wrong. I tried this, but it still didn't work:

grub-install --root-directory=/mnt/target /dev/hda

mkdir: cannot create directory '/mnt/target/boot': Permission denied

#2 2012-02-17 06:16:07

Guest
Guest

Re: Grub not installing

I've read the documentation more carefully. Grub does appear to be installed under /boot/grub/, and the menu.lst is present. I edited it to include Windows XP. Here is what it looks like:

[c]# /boot/grub/menu.lst: GRUB boot loader configuration.
#

# By default, boot the first entry.
default 0

# Boot automatically after 15 secs.
timeout 15

# Change the colors.
color yellow/brown light-green/black

# For booting SliTaz from : /dev/hda2
#
title Windows XP Pro SP3
rootnoverify (hd0,0)
chainloader +1

title SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.30.6-slitaz)
root (hd0,1)
kernel /boot/vmlinuz-2.6.30.6-slitaz root=/dev/hda2[/c]
But the Grub menu still does not appear when I restart.

#3 2012-02-17 06:58:54

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

Re: Grub not installing

Then Grub is not installed into the MBR.

There is something wrong in the way you worked with the Grub installation at the final step of the process. You must install Grub to the MBR of the harddrive in this case. If there is, in a prior step, no bootloader Grub there then there cannot be a directory /boot on your slitaz partition hda2.

grub-install --root-directory=/mnt/target /dev/hda

This means: place the boot part of the harddrive (where Grub must already be) to /mnt/target. While installing /dev/hda2 is mounted on /mnt/target - it is called like this as long as it installs. When you finish the installation it is unmounted and you will not see any /mnt/target when you write ,,mount" into a root konsole.

So you decide first to let Grub be installed into the MBR of the harddrive: /dev/hda

Offline

#4 2012-02-17 07:37:12

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Grub not installing

There is also the grub install to MBR from the grub prompt with the setup command.

Once you've verified the grub files are in /boot/grub of /dev/hda2

Open xterm,be root

#grub

Grub prompt is displayed:

#grub> find /boot/grub/stage1

Output should be: (hd0,1)

Set (hd0,1) as root so grub knows where to source the install files.

#grub> root (hd0,1)

#grub> setup (hd0)

Checking if "/boot/grub/stage1" exists... yes

Checking if "/boot/grub/stage2" exists... yes

Checking if "/boot/grub/e2fs_stage1_5" exists... yes

Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.

succeeded

Running "install /boot/grub/stage1 d (hd0) (hd0)1+15 p (hd0,1)/boot/grub/stage

2 /boot/grub/menu.lst"... succeeded

Done.

More info here: http://members.iinet.net.au/~herman546/p15.html

Offline

#5 2012-02-17 07:48:44

Guest
Guest

Re: Grub not installing

After the installer finished installing SliTaz, it asked me "Install GRUB on /dev/hda ?" I selected "Yes". After a moment, it said it was finished. The GRUB menu still does not appear when I restart.

So what can I do?

EDIT: I will try your steps mojo and let you know what happens.

#6 2012-02-17 07:53:15

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Grub not installing

What happens after the grub menu doesn't appear?

Does it boot into windows?

Offline

#7 2012-02-17 08:00:19

Guest
Guest

Re: Grub not installing

When I attempt find /boot/grub/stage1 I get:

Error 15: file not found

#8 2012-02-17 08:01:02

Guest
Guest

Re: Grub not installing

Yes, it boots into Windows.

#9 2012-02-17 08:17:34

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Grub not installing

Open pcmanfm file manager in the left pane you should see a partition the size of hda2

Click to mount,navigate the right pane to /boot/grub do you see file called stage1 ?

Offline

#10 2012-02-17 08:18:31

Guest
Guest

Re: Grub not installing

Don't know if this helps, but I read this GRUB page (http://members.iinet.net.au/~herman546/p15.html#Re-install_Grub_with_Live_CD) and tried the following:

[c]root@slitaz:/home/tux# grub-install --root-directory=/media/disk /dev/hda
/usr/sbin/grub-install: line 434: grub-probe: not found
sh: xfs: unknown operand
The file /media/disk/boot/grub/stage1 not read correctly.[/c]

#11 2012-02-17 08:27:02

Guest
Guest

Re: Grub not installing

Yes, stage1 is there.

[c]root@slitaz:/media/disk/boot/grub# ls
default            ffs_stage1_5       minix_stage1_5     ufs2_stage1_5
device.map         iso9660_stage1_5   reiserfs_stage1_5  vstafs_stage1_5
e2fs_stage1_5      jfs_stage1_5       stage1             xfs_stage1_5
fat_stage1_5       menu.lst           stage2[/c]

#12 2012-02-17 20:24:36

Guest
Guest

Re: Grub not installing

[c]tux@slitaz:~$ su
Password:
root@slitaz:/home/tux# fdisk -l

Disk /dev/hda: 80.0 GB, 80060424192 bytes
240 heads, 63 sectors/track, 10341 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/hda1   *           1        5168    39070048+  7 HPFS/NTFS
/dev/hda2            5169       10341    39107880   1 FAT12
root@slitaz:/home/tux# ls /media/disk/boot/grub/
default            e2fs_stage1_5      menu.lst           stage1
device.map         fat_stage1_5       minix_stage1_5     stage2
device.map~        jfs_stage1_5       reiserfs_stage1_5  xfs_stage1_5
root@slitaz:/home/tux# grub-install --root-directory=/media/disk /dev/hda
/dev/hda does not have any corresponding BIOS drive.
root@slitaz:/home/tux# grub-install /dev/hda --recheck
Probing devices to guess BIOS drives. This may take a long time.
Could not find device for /boot: Not found or not a block device.[/c]
hda1 is XP. hda2 is still listed as FAT?

#13 2012-02-17 20:43:39

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Grub not installing

Applications/System tools/Gparted Partition Editor

Format slitaz partition /dev/hda2 with ext3 filesystem

You may want to try Manual Installation to reinstall slitaz onto ext3 partition

instead of Slitaz-Installer :

http://doc.slitaz.org/en:handbook:installation

Try to install grub again.

More than once I've had to put a hard drive into another computer to install grub.

Offline

#14 2012-02-17 21:52:42

Guest
Guest

Re: Grub not installing

That did it! smile Slitaz works, GRUB appears, and I can boot into it and XP fine. I guess the installer was having a problem reformatting the drive, who knows.

Thank you for all the help. I really appreciate it!

#15 2012-02-20 00:48:55

Ridgeland
Member
Registered: 2012-02-19
Posts: 2

Re: Grub not installing

Thank you mojo for your post.

I have a 1997 PC with an i586 processor 200MHz.  I just installed Lubuntu 10.04 (last Ubuntu that supports i586).  I let GRUB2 install to MBR.  The partition I used on the hard drive was beyond 4GB and  the BIOS could not reach it, PC could not boot. It's easy to remember limits like those the second time you break them.  SuperGrubDisk CD let me boot back to Slitaz and the #grub steps you gave repaired GRUB and I can boot again.

Just a side bar.  My fix for the BIOS reach limit of 4GB is to have the first partition be 200MB.  There I create directories as needed.  Lubuntu in this case is on hda5 but in hda1 I created a directory

/boot/hda5/ and copied in vmlinuz and initrd from hda5's /boot/.  Then I create a stanza in Slitaz's menu.lst like this...

title Lubuntu 10.04 on hda5

kernel (hd0,0)/boot/hda5/vmlinuz-xxx root=/dev/sda5

initrd (hd0,0)/boot/hda5/initrd-xxx.img

Boots fine now.  I can use hda6, hda7 and hda8 for other OS tests.  Slitaz-Cooking will be one.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

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