Tiny Core Linux

General TC => General TC Talk => Topic started by: ananix on July 02, 2014, 11:29:42 AM

Title: grub-install recheck
Post by: ananix on July 02, 2014, 11:29:42 AM
Hello im making an install script and to begin with it was working fine but now it says "Could not find device for /boot: Not found or not a block device" when trying to install boot record with grub-install.
I have tried to go back a few versions of my image, and tried to see if it was changes to system or script but I cant seem to find any thing...
Maybe some of you have an idea of how to install a boot loader with grub-install on TCL?

here is my install procedure:

tce-load -i grub-0.97-splash.tcz
sudo mkfs.ext3 /dev/sda1
sudo rebuildfstab
sudo mount /mnt/sda1
sudo mkdir -p /mnt/sda1/boot/grub
sudo mount /mnt/sdb1
sudo cp -p /mnt/sdb1/boot/* /mnt/sda1/boot/
sudo mkdir -p /mnt/sda1/tce
sudo cp -rp /mnt/sdb1/tce /mnt/sda1/
sudo cp -p /usr/lib/grub/i386-pc/* /mnt/sda1/boot/grub/
sudo touch /mnt/sda1/boot/grub/menu.lst
sudo chmod 777 /mnt/sda1/boot/grub/menu.lst
echo 'default 0
timeout 10
title JayCore
root (hd0,0)
kernel /boot/vmlinuz quiet lang=da_DK.UTF-8 kmap=qwerty/dk waitusb=5 loglevel=3
initrd /boot/core.gz
' > /mnt/sda1/boot/grub/menu.lst
sudo grub-install --recheck /dev/sda

  -- Andreas
Title: Re: grub-install recheck
Post by: Lee on July 02, 2014, 09:59:32 PM
Any reason not go to grub4dos?

I stopped using the older grub long enough ago that I don't remember the details of it, but one of the reasons I switched to grub4dos was that it's so simple to install.
Title: Re: grub-install recheck
Post by: coreplayer2 on July 03, 2014, 01:00:33 AM
I find grub2 extremely easy to instal   :P
Title: Re: grub-install recheck
Post by: ananix on July 03, 2014, 02:47:35 AM
nope, no reason, the few TCL install guides i found where just using the grub-0.97-splash package.
grub4dos im thinking its for booting FAT filesystems?
grub2 i did not think i saw in the repo.
Do you have any hints for moving down any of those two roads to get me start?

  -- Andreas
Title: Re: grub-install recheck
Post by: Juanito on July 03, 2014, 02:52:56 AM
grub2 i did not think i saw in the repo.

See http://www.tinycorelinux.net/5.x/x86/tcz/grub2.tcz.info
Title: Re: grub-install recheck
Post by: ananix on July 03, 2014, 04:47:33 AM
sorry to be such a bugger, but any help with grub2 would be apreciated, im just trying to make tcl boot from a harddisk, all is okay except the boot record.

the howto in the pkg description is not really working for me im for instance missing the grub.cfg....
Title: Re: grub-install recheck
Post by: Juanito on July 03, 2014, 06:08:58 AM
You have to create the grub.cfg file yourself - for example:
Code: [Select]
$ sudo vi /mnt/sdc1/grub/grub.cfg
..or create the grub.cfg with a text editor, save it and then use "sudo cp" to copy it to the correct location.
Title: Re: grub-install recheck
Post by: ananix on July 03, 2014, 06:46:14 AM
thanks for your help guys but im all lost here, i think im gonna close this one down and try post again from another angle.
Title: Re: grub-install recheck
Post by: Lee on July 03, 2014, 10:08:48 AM
Quote
grub4dos im thinking its for booting FAT filesystems?

That's what I thought at first, too, but it works just as well with the ext family of file systems and others.  I have no idea why they gave it such a misleading name.

I have to confess, I -still- haven't tried out grub2.
Title: Re: grub-install recheck
Post by: ananix on July 03, 2014, 12:08:58 PM
ok ill keep that in mind, but it proved to be working with grub-0.97 after all, the recheck was misleading me from something that was already working and which i was testing wrong.
to install a grub in the master boot record all you have to do is to point at the boot directory located on your disk something like this "grub-install --root-directory=/mnt/sda1 /dev/sda"
Ofcourse after you have copied the the boot folder to /mnt/sda1