WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: microcore: can't install grub on hard disk  (Read 8886 times)

Offline icy

  • Newbie
  • *
  • Posts: 4
microcore: can't install grub on hard disk
« on: March 06, 2010, 11:58:20 PM »
Hello all,

I followed the same steps in http://tinycorelinux.com/install.html to install "micro-core" (but I changed initrd to '/boot/microcore.gz'). After finishing, I reboot the system from the hard disk and I see grub console. There's something wrong so that system can't boot automatically, though I can boot it using grub commands

Code: [Select]
root (hd0,0)
kernel /boot/bzImage
initrd /boot/microcore.gz
boot

How can I make system boot automatically?

Thank you.
« Last Edit: March 07, 2010, 12:07:56 AM by icy »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: microcore: can't install grub on hard disk
« Reply #1 on: March 07, 2010, 01:14:40 AM »
Please post your menu.lst.
The only barriers that can stop you are the ones you create yourself.

Offline icy

  • Newbie
  • *
  • Posts: 4
Re: microcore: can't install grub on hard disk
« Reply #2 on: March 07, 2010, 06:08:13 AM »
Thank you. Below is my `menu.lst`

location: /mnt/hda1/boot/grub/menu.lst
contents

Code: [Select]
default 0
timeout 10

title tinycore
root (hd0,0)
kernel /boot/bzImage root=/dev/hda1
initrd /boot/microcore.gz

A note: when I used `grub-install '(hd0)'` from root account, I see the message

Code: [Select]
Could not find device for /boot: Not found or not a block device

Below my contents (stripped) of `fdisk -l /dev/hda` (which is Virtualbox vdi file):

Code: [Select]
16 heads, 63 sectors/track,  81 cylinders
device       boot   start   end   blocks    Id   System
/dev/hda1  *       1        81    40792+   83   Linux

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10962
Re: microcore: can't install grub on hard disk
« Reply #3 on: March 07, 2010, 08:55:47 AM »
The menu.lst looks fine. Could be grub is not finding it.

Did you install with grub-install? It is known not to work in all cases, doing it the way in the install guide would be better if so.

Mainly,

sudo su
grub
root (hd0,0)
setup (hd0)
quit
The only barriers that can stop you are the ones you create yourself.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: microcore: can't install grub on hard disk
« Reply #4 on: March 07, 2010, 09:16:57 AM »
This is what I would use.

default 0
timeout 5

title   Microcore
root   (hd0,0)
kernel   /boot/bzImage quiet tce=hda1 home=hda1 opt=hda1 max_loop=256
initrd   /boot/microcore.gz
Many people see what is. Some people see what can be, and make a difference.

Offline icy

  • Newbie
  • *
  • Posts: 4
Re: microcore: can't install grub on hard disk
« Reply #5 on: March 07, 2010, 08:24:34 PM »
Thank you, Guy and curaga.

I used the menu.lst as provided by Guy. I run grub commands in root acount and the result seemed to be OK (see image below), but the problem still remains and when system boots, it goes directly to grub's shell :(.



(if you can't view the image, feel free to visit http://gx.viettug.org/zen/kyanh/jobs/microcore_e1.jpg.html)

Offline icy

  • Newbie
  • *
  • Posts: 4
Re: microcore: can't install grub on hard disk
« Reply #6 on: March 07, 2010, 10:57:42 PM »
Dear all,

I have created a fixed-sized .vdi in VirtualBox, and started from the first step in http://tinycorelinux.com/install.html (of course, without GUI and with a different initrd setting), and then I used the Grub's menu.lst as provided by Guy. And the system works fine now.

I doubt the problem is caused by using dynamic size .vdi file when creating hard disk in VirtualBox. I am not sure about this, but finally the problem is solved.

If you need any information to debug the  problem, please let me know. I can even show you the .vdi that caused the problem.

Thank you all for your kind helps  :)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: microcore: can't install grub on hard disk
« Reply #7 on: March 08, 2010, 09:27:07 AM »
I've had this problem too:
$ sudo grub-install /dev/hda

Could not find device for /boot: Not found or not a block device.

Here is what you need:
$ sudo grub-install --root-directory=/mnt/hda1 /dev/hda

Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /mnt/hda1/boot/grub/device.map
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script 'grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda

Offline tech2k

  • Newbie
  • *
  • Posts: 2
Re: microcore: can't install grub on hard disk
« Reply #8 on: March 08, 2010, 05:32:31 PM »
I did my first "scatter" install last night with MicroCore 2.9 on a netbook by booting a remastered microcore.gz which included compiletc,aspell,cdrtools,lynx,qemu built for no sdl/graphics etc to ram and then cp -a /  to  /mnt/sda1/  but making an empty sys/ mnt/ proc/ .

Grub went something like :

mkdir -p /mnt/sda1/boot/grub
cp /usr/lib/grub/i386-pc/* /mnt/sda1/boot/grub/
chroot /mnt/sda1/
mount -t proc /proc proc
grub
grub> find /boot/grub/stage1
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
umount /proc
exit

Then I made a /boot/grub/menu.lst that said :

default 0
timeout 20
root (hd0,0)
Title Linux
kernel /boot/bzImage root=/dev/sda1 rw

Put a kernel in /boot type "reboot" and all is golden.

Yes I understand about "system rot" and know you dont have to remaster the initrd to add extensions but I like to play and my systems dont get old enough to rot before I wipe them clean and build something else ;)

P.S.
I just love TinyCore/MicroCore. I use Microcore every day for my host development system and it compiles about everything I feed it.Just made a loaded minicd with room for the Firmware Linux Project including source.
Great job Roberts and all who work on this nice project...Thanks!

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: microcore: can't install grub on hard disk
« Reply #9 on: March 10, 2010, 06:36:08 PM »
@tech2k: I have my serious doubts about your reported 'menu.lst' file: AFAIK the 'root (hd0,0)' entry has to appear after the 'title' entry and 'title' has to be spelled with a lower case 't'.

Therefore I believe your 'menu.lst' should rather look like the following:
Code: [Select]
default 0
timeout 20
title Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/sda1 rw

Offline tech2k

  • Newbie
  • *
  • Posts: 2
Re: microcore: can't install grub on hard disk
« Reply #10 on: March 11, 2010, 05:48:36 PM »
@maro

Thanks for the information.You are correct that the root statment is usually after the title and probably the *standard* way to do it...I wouldnt know as Im an hvac/r tech and not a Linux guru.I just like to tinker with tiny system construction as a hobby (mainly tiny,micro,slitaz,fwl,kolibri).

I just booted my netbook after reading your post and said cat /boot/grub/menu.lst and it looks exactly as I posted above (and works just fine).

As a quick test I added KolibriOS as a fugal install and edited the menu.lst to say

default 0
timeout 20
root (hd0,0)
title Linux
kernel /boot/bzImage root=/dev/sda1 rw

title KolibriOS
kernel /kolibri/memdisk
initrd /kolibri/kolibri.img

Now I can boot either one with no errors.I think I like putting the root(whatever) up top just once and not having to repeat it after each title keeping my menu.lst as simple as possible.It works in my case because I do many fugal installs on one partition which co exsist with my regular install.



Edit - Sorry for the typo on the letter T in title....yes it must be lowercase with grub (didnt mater with syslinux).I am posting this from a yucky xp box because I havent got aroud to my a600 cell modem setup under tux yet.
« Last Edit: March 11, 2010, 06:00:00 PM by tech2k »