WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Grub stage of install fails  (Read 3789 times)

Offline smilebot

  • Newbie
  • *
  • Posts: 10
Grub stage of install fails
« on: July 29, 2010, 08:35:24 PM »
As I could not complete an install to a USB flash drive, I'm trying to install TC to the hard drive of a ThinkPad. All goes swimmingly, exactly as shown in the instructions, until the TC installation step:

setup (hd0)

Terminal says:

Checking if "/boot/grub/stage1" exists ... no
Checking if "/grub/stage1" exists ... no
Error 2: Bad file or directory type

In fact, a directory listing shows that stage1 does exist where it is supposed to be. I performed the installation procedure twice to make sure I did it right. Same result.

Yes I copied bzImage with a capital I and performed the Step 6 copy of Grub files as instructed. I also tried sudo grub but it makes no difference. grub-0.97-splash.tcz is installed.

I'd appreciate any advice.
« Last Edit: July 29, 2010, 08:47:22 PM by smilebot »
All boundaries are for practical purposes only

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Grub stage of install fails
« Reply #1 on: July 29, 2010, 08:46:04 PM »
You forgot the step where you copy the grub files to the boot drive.

Offline smilebot

  • Newbie
  • *
  • Posts: 10
Re: Grub stage of install fails
« Reply #2 on: July 29, 2010, 08:52:37 PM »
You forgot the step where you copy the grub files to the boot drive.

I don't think so. The contents of the destination folder /mnt/hda1/boot/grub/ are identical to the contents of the source folder /usr/lib/grub/i386-pc/ with the exception of menu.lst which was added to /mnt/hda1/boot/grub/ .

The files stage1, stage2 and stage2_eltorito are present in /mnt/hda1/boot/grub/ .
« Last Edit: July 29, 2010, 08:55:13 PM by smilebot »
All boundaries are for practical purposes only

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: Grub stage of install fails
« Reply #3 on: July 30, 2010, 03:59:43 AM »
Are you sure you got the right hd number? Tab-complete to be sure.
The only barriers that can stop you are the ones you create yourself.

Offline smilebot

  • Newbie
  • *
  • Posts: 10
Re: Grub stage of install fails
« Reply #4 on: July 30, 2010, 07:28:00 AM »
On a second attempt I succeeded at installing TC.

The difference was: I used Gparted to wipe hda and put in a new partition table. Then I performed the TC installation from the beginning with no change in any parameters.

However, rebuildfstab reported an error. It was necessary to reboot in order to make rebuildfstab work. That step is not in the instructions. Grub setup, which was my original problem, worked this time.

These things make me appreciate installers. Hopefully TC will get an installer.

I used cfdisk to make only one partition. No swap. Will it matter? The computer has 1GB RAM & 60 GB HD. Other than web browsing and text editing, the only resource consumptive thing I may do with it is Audacity audio recording.

Thanks!
All boundaries are for practical purposes only

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: Grub stage of install fails
« Reply #5 on: July 30, 2010, 07:38:32 AM »
You'd be surprised how easy it is to consume 1 gb of ram with firefox & flash ;)

Should work fine for normal use.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Grub stage of install fails
« Reply #6 on: July 30, 2010, 08:24:34 AM »
However, rebuildfstab reported an error. It was necessary to reboot in order to make rebuildfstab work. That step is not in the instructions.
I used cfdisk to make only one partition. No swap. Will it matter? The computer has 1GB RAM & 60 GB HD. Other than web browsing and text editing, the only resource consumptive thing I may do with it is Audacity audio recording.
I used gparted a month ago to do way more complex partitioning:
shrinking NTFS partition, copying it, creating a FAT32 partition, creating an extended partition, creating a reiserfs partition in part of size of extended.
Did rebuildfstab and haven't rebooted ever since, and all appears to be fine.

You  could make a swapfile at any moment, when need arises.
You'd be surprised how easy it is to consume 1 gb of ram with firefox & flash ;)
It's not that difficult with opera either  :P

Text editing doesn't necessarily have to be resource consumptive; the only text editor i have so far ever used in TC (e3) uses 28Kb of RES memory starting with an empty file, in fact the least memory consuming Linux app i have ever seen.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline smilebot

  • Newbie
  • *
  • Posts: 10
Re: Grub stage of install fails
« Reply #7 on: July 30, 2010, 11:07:46 AM »
You could make a swapfile at any moment, when need arises.

Without reformatting the drive and reinstalling the OS?
All boundaries are for practical purposes only

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Grub stage of install fails
« Reply #8 on: July 30, 2010, 11:26:58 AM »
Yes. For example:
dd if=/dev/zero of=/dev/hda1/swapfile bs=1M count=512
mkswap /dev/hda1/swapfile
swapon /dev/hda1/swapfile

Then add the swapon command to /opt/bootlocal.sh, and do a backup.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Grub stage of install fails
« Reply #9 on: July 30, 2010, 02:16:43 PM »
or see swapfile in cpanel

However, rebuildfstab reported an error. It was necessary to reboot in order to make rebuildfstab work. That step is not in the instructions. Grub setup, which was my original problem, worked this time.
What was the error?  In any case, I think there used to be a note about the possibility of rebooting - but tools such as cfdisk have such a note.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Grub stage of install fails
« Reply #10 on: July 30, 2010, 02:31:26 PM »
You do not need to reboot, but you do need to run rebuildfstab and it is in the instructions, see Step 4 of the installation guide.
Code: [Select]
4. Formatting

Format the new partition. This demonstration will use ext3. You may format other partitions here as preferred.

mkfs.ext3 /dev/hda1

After formatting rebuild the fstab file

rebuildfstab

Note that if you wish to migrate to ext4, or use grub 2, enable 256-byte inodes by adding -I 256 to the mkfs command above. (capital i)

10+ Years Contributing to Linux Open Source Projects.

Offline smilebot

  • Newbie
  • *
  • Posts: 10
Re: Grub stage of install fails
« Reply #11 on: July 30, 2010, 04:05:37 PM »
or see swapfile in cpanel

Thank you, I did see the swapfile button in the cpanel, but did not find documentation in the wiki about it.

I'd prefer to use a simple button rather than typing in the dd and swapon code (code which I do not yet understand  :-\)

Robert, I did run rebuildfstab and I did have to reboot, or at least I did not know how to resolve the rebuildfstab error without rebooting. The error reported by rebuildfstab was, IIRC, that it could not find hda or hda1 in the fstab.

Cfdisk does have such a note. That is what made me think that rebooting might resolve the error.
All boundaries are for practical purposes only