Welcome, Guest. Please login or register.
September 02, 2010, 01:25:23 PM
Home Help Search Login Register
News: 07/19/2010 Tiny Core v3.0 now released!

[Recent Topics] [Main . Forum . Wiki]
+  tinycorelinux.com
|-+  Tiny Core Base
| |-+  Micro Core & Core Elements
| | |-+  microcore: can't install grub on hard disk
« previous next »
Pages: [1] Go Down Print
Author Topic: microcore: can't install grub on hard disk  (Read 696 times)
icy
Newbie
*
Offline Offline

Posts: 4


« on: March 07, 2010, 12:58:20 AM »

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:
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, 01:07:56 AM by icy » Logged
curaga
Administrator
*****
Offline Offline

Posts: 3256



« Reply #1 on: March 07, 2010, 02:14:40 AM »

Please post your menu.lst.
Logged

The only barriers that can stop you are the ones you create yourself.
icy
Newbie
*
Offline Offline

Posts: 4


« Reply #2 on: March 07, 2010, 07:08:13 AM »

Thank you. Below is my `menu.lst`

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

Code:
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:
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:
16 heads, 63 sectors/track,  81 cylinders
device       boot   start   end   blocks    Id   System
/dev/hda1  *       1        81    40792+   83   Linux
Logged
curaga
Administrator
*****
Offline Offline

Posts: 3256



« Reply #3 on: March 07, 2010, 09: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
Logged

The only barriers that can stop you are the ones you create yourself.
Guy
Sr. Member
****
Offline Offline

Posts: 428


« Reply #4 on: March 07, 2010, 10: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
Logged

Many people see what is. Some people see what can be, and make a difference.
icy
Newbie
*
Offline Offline

Posts: 4


« Reply #5 on: March 07, 2010, 09: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 Sad.



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

Posts: 4


« Reply #6 on: March 07, 2010, 11: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  Smiley
Logged
danielibarnes
Full Member
***
Offline Offline

Posts: 249



« Reply #7 on: March 08, 2010, 10: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
Logged
tech2k
Newbie
*
Offline Offline

Posts: 2


« Reply #8 on: March 08, 2010, 06: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 Wink

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!
Logged
maro
Sr. Member
****
Offline Offline

Posts: 402


« Reply #9 on: March 10, 2010, 07: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:
default 0
timeout 20
title Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/sda1 rw
Logged
tech2k
Newbie
*
Offline Offline

Posts: 2


« Reply #10 on: March 11, 2010, 06: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, 07:00:00 PM by tech2k » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!