Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: antiMS on January 02, 2011, 12:50:27 PM
-
Please help... newbie trying to learn and troubleshoot... I've read the documentation, and searched the Forum and Wiki, but am still having problems.
I'm not understanding why the cp command, and the grub commands don't appear to be working correctly during my TC install. I'm installing the current TC version, version 3.4.1.
Summary:
Problem #1: When setting-up GRUB, I receive the following messages:
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
Problem #2: If I exit TC, reboot from the Tiny Core iso boot CD, and open FileMgr, the mnt/hda1/boot/grub directory displays; however, none of the GRUB files display.
Situation:
I'm attempting a TC install on a computer with hard drive that's not currently connected to the internet. Here's what I've done thus far:
1. Created a Tiny Core iso boot CD. Also, burned onto the same CD the following GRUB files:
grub-0.97-splash.tcz
grub-0.97-splash.tcz.dep
grub-0.97-splash.tcz.md5.txt
ncurses.tcz
ncurses.tcz.dep
ncurses.tcz.md5.txt
ncurses-common.tcz
ncurses-common.tcz.dep
2. Created a GParted Magic iso boot CD.
3. Booted the computer from GParted Magic iso CD.
4. Utilized GParted Partition Editor to create the following hard drive partitions:
/dev/sda1 ext3 100MB boot flag
/dev/sda2 linux-swap 2GB
/dev/sda3 ext3 10.04GB
5. Utilized PCMan File Manager to paste the Tiny Core boot folder into partition /dev/sda1.
6. Utilized PCMan File Manager to create the /tce/optional directory in partition /dev/sda3.
7. Copied and pasted the following GRUB files from CD to the /tce/optional directory:
grub-0.97-splash.tcz
grub-0.97-splash.tcz.dep
grub-0.97-splash.tcz.md5.txt
ncurses.tcz
ncurses.tcz.dep
ncurses.tcz.md5.txt
ncurses-common.tcz
ncurses-common.tcz.dep
8. Rebooted the computer with the Tiny Core iso boot CD.
9. Opened the TC AppBrowser and performed a local install of grub-0.97-splash.tcz (Connect > Local, selected grub-0.97-splash.tcz, clicked OK). I received the grub-0.97-splash.tcz ok message in AppBrowser.
10. Opened the TC Aterm terminal, and typed sudo su.
11. In order to ensure I utilized the proper partition naming convention for TC, I ran the fdisk -l command, which gave the following output:
/dev/hda1 boot
/dev/hda2 linux swap
/dev/hda3
12. Made a directory for GRUB as follows:
mkdir -p /mnt/hda1/boot/grub
13. Copied the GRUB files to the newly created directory:
cp -r /usr/lib/grub/i386-pc/* /mnt/hda1/boot/grub
14. Opened TC FileMgr to verify the directory and files copied. The directory and files were listed (including the files that GRUB says don't exist in step #17 below).
15. In the TC Aterm terminal, typed grub.
16. After getting the grub prompt, I typed root (hd0,0). It returned the following message:
Filesystem type is ext2fs, partition type 0x83.
17. At the next grub prompt, I typed setup (hd0). It returned the following messages:
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
Also, if I exit TC, reboot from the CD, and open FileMgr, the mnt/hda1/boot/grub directory displays; however, none of the GRUB files display.
Can anyone help?!! Did I setup something wrong?
Thanks!
-
Hi AntiMS,
Did you edit /boot/grub/menu.lst?
Edit: am using grub not grub2.
-
Copy the grub files from the directory found in /tmp/tcloop.
-
Hi John JS: I'm running GRUB, also. No, I have not created /boot/grub/menu.lst yet. Does the system even read that file before reboot? Or, is GRUB attempting to read it when I run the grub command from Aterm?
Hi Gerald: do you mean to copy to the following path?:
cp -r tmp/tcloop /mnt/hda1/boot/grub
-
Hi:
GRUB 1 or "the old GRUB" uses the file menu.lst to set up the boot menu, after
start up. Every Linux or Win version on your hard drive needs to be listet in this
file. The menue.lst file is usually located in:
/boot/grub/menu.lst
If you want I can dig out a menue.lst file I have on another machine here.
-
For grub-0.97-splash, the files are in
/tmp/tcloop/grub-0.97-splash/usr/lib/grub/i386-pc/
This, unfortunately, does not include even an example menu.lst file.
-
However, the installation document does have a sample menu.lst.
-
Thanks for all the quick responses! You guys rock!
I ran the copy command for the grub files again as follows:
cp -r /tmp/tcloop/grub-0.97-splash/usr/lib/grub/i386-pc/* /mnt/hda1/boot/grub/
Afterward, I ran the grub command again from Aterm. It appears to have corrected part of the problem, because I obtained the following response:
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage1" 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 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
Will this solve the problem of those files being missing from the /mnt/hda1/boot/grub directory when rebooting from the CD?
-
hi:
here is ample file, which should work - if not please let me know
================================================
EXAMPLE of single linux menue.lst file:
# file is /boot/grub/menu.lst
# root is hda1 - grub counts different!
# bzImage and tinycore.gz are in /boot
title tinycore version 3.4.1
root (hd0,0)
kernel /boot/bzImage root=/dev/hda1 ro
initrd /boot/tinycore.gz
=============================================
-
Thanks, beerstein.
I created the menu.lst file, and I utilized a combination between what you provided, and the example given in the TC documentation.
I was able to restart the computer and boot into Tiny Core.
Here's what I used in the menu.lst file:
default 0
timeout 5
title Tiny Core version 3.4.1
root (hd0,0)
kernel /boot/bzImage
initrd /boot/tinycore.gz
Since my tce/optional directory is in the /dev/sda3 partition, in order to have extensions loaded On Demand, I assume I need to add something like tce=/dev/hda3 to the kernel line of the menu.lst file?
Also, is it normal that the /mnt/hda1/boot/grub directory, along with the files that I copied into it during the install process are not there now after booting when I look in FileMgr? The /mnt/hda1 directory is listed, but not the /boot/grub sub-directory.
Is this right, or did I do something wrong?
-
If the tce directory exists, you do not need to specify it in the boot options.
If the tce directory is on a USB drive, you need waitusb=10 or one of the more advances waitusb options.
The boot partition is not mounted at boot.
-
Thanks, Gerald.
That did it... I mounted hda1, and now the /boot/grub directory and files display in FileMgr.
Wow. I've sure got a lot to learn still!!!
Re. the tce directory... so, TC will find that directory, even though it's in another partition?
-
Yes, provided it is not in a subdirectory on that partition.
-
Thank you for the detailed assistance today, everyone (JohnJS, Lee, beerstein, & Gerald)!
I'm up and running TC! And, I'm playing around with loading and unload extensions using the Apps manager and AppsAudit.
I've still got a lot to learn, but you guys are making it much less painless!
Have a blessed evening!
-
@antiMS: As gerald_clark has already pointed out: 'tce' directories will be found as long as they are in the root of a supported file system that could be identified at boot time.
Now what could be reasons for still using the 'tce=...' boot code? If you have multiple devices which have a 'tce' directory in the root, or if the 'tce' is not in the root (e.g. 'tce=sda2/deep/down/tce'), or to speed things up as TC would take its "guidance" from the 'tce=...' boot code and would not have to spend time searching around.
Why would a user want to have multiple 'tce' directories? Well, imagine one wants to support multiple TC versions (e.g. TC 2.x and TC 3.x) or has different setups (e.g. a minimalist browsing setup, and a full-blown development one). All these can be easily accomodated if multiple boot stanzas in the 'menu.lst' file would point to different combinations of kernel (i.e. 'bzImage'), initrd (i.e. 'tinycore.gz') and extensions (or some other different boot codes).
-
HI:
Yes this is what I like to have - several tce directories for different
TC versions. I tried to do that when I had a /tce at hda1 - I booted a new
TC version with a new /tce on hda2 - bit it did not turn out as I was expecting it.
So I renamed the first /tce in /tce_old
But in this case I asways have to rename the direcories
Is there a better way to do it?
-
You could use the "tce=" boot code to use extensions in, for example, /tce_2x, /tce_3x on the same partition.
-
Thank you for the further explanation, Maro! That is very helpful information for future reference.