Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: adszhu on September 03, 2009, 10:54:36 AM

Title: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 03, 2009, 10:54:36 AM
Hi,
I have 2 NTFS partitions, one of them (C:\) is for OS. I have an XP on it, and an Ubuntu installed with Wubi. On boot time, I can choose which OS to boot.
I have tried TC with netboot, and now I would like to install it, too, so that I can choose even TC to boot.
What do you recommend?
- Do I need a new Linux partition?
- How to achieve that at boot time I can select TC, too?

Thanks in advance

Ádám
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 03, 2009, 11:09:43 AM
Quote
Do I need a new Linux partition?

I suggest using a new Linux partition, and a swap partition.

To select which operating system you want to boot, I suggest Grub.

Info on how to Install Tiny Core, including setting up Grub: /net-install.html][removed due to policy violation]/net-install.html (http://[removed due to policy violation)

Grub commands for Windows: /grub.html][removed due to policy violation]/grub.html (http://[removed due to policy violation)

The ideal way would be to create a Linux partition for Ubuntu, and install it there. If you have Windows already installed, Grub in Ubuntu will automatically include commands to start Windows. You can add commands for Tiny Core to Grub in Ubuntu.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 04, 2009, 03:20:52 AM
Thanks for the tips, Guy, I am going to do that!
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: alu on September 04, 2009, 03:26:54 AM
i think that you don't need a new partition, just grub: grub your hd, copy your bzImage and tinycore.gz to your hd and edit the proper line in menu.lst; at boot prompt, grub displays an entry for tc in order for you to boot it; if you want to save some extension, create a tce folder on your hd (at the root of your hd if you want tc to load the extensions at boot);
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 04, 2009, 03:40:53 AM
Hi Alu,
I need some clarification :)
grub your hd, copy your bzImage and tinycore.gz to your hd and edit the proper line in menu.lst
Currently I boot TC using netboot. How should I "grub my hd"?
Thanks,
Ádám
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: alu on September 04, 2009, 08:54:14 AM
mmhh. it seems less easy that i believed. yes, you can grub your ntfs partition maybe even using tc (i think, since it has the grub 0.97 version which should do that); you will find more info in the installation rubric of the site at point 6.

but... i am not sure that you can load the bzImage and tinycore.gz from your ntfs partition once grub works.

So, in order to test this before grubing your partition, you might use an empty vfat formated usb stick and syslinux it with tc in order to boot from it (you don't need to have anything on the usb stick):

syslinux -f /dev/yourusbstick

Then, create a folder named boot on your ntfs partition at the root of your master hd and copy the bzImage and the tinycore.gz into it.

Now, edit the syslinux configuration file on your usb stick with these lines:

label tinycore
kernel /boot/bzImage
append initrd=/boot/tynicore.gz quiet

Shut down your machine, plug the usb stick, start your machine and press F8 (it can be another key depending on the machine) in order to get the boot options; choose the boot from your usb stick (you can also edit this in your bios). If nothing appens, you are good to partition your hd in order to setup a linux partition, or to boot tc from an external media. 
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Lee on September 04, 2009, 09:15:50 AM
Just a heads-up about grub:

I notice that /mnt/hda1/boot/grub contains files like e2fs_stage1_5, fat_stage1_5, etc but I don't see one named ntfs_stage1_5.  I haven't experimented with installing grub on an ntfs drive or trying to boot windows from grub - but its things like this that make me want to let someone else try it first.   ;D
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: alu on September 04, 2009, 09:37:18 AM
yep, your are right; i think that the grub utility of etch installs grub on ntfs; however, i don't know if it is worth the pain if it is possible just to load tc from ntfs with the help of an external media or, why not, the windows boot.ini.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: alu on September 04, 2009, 01:13:17 PM
i wanted to try it with my install (dualboot ubuntu & winxp on ntfs and grub bootloader), but my grub does not handle ntfs, so it cant mount it (where i have loaded my tc); forget my post with syslinux, it can't mount ntfs (where did i have my mind??); so, i am trying something else, and will report back if it works
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 04, 2009, 02:08:29 PM
I suggest new users don't even try to install Linux on NTFS. It is not straightforward.

The easiest way is to make a Linux partition.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 06, 2009, 02:33:29 AM
OK guys,
created a new Llinux partition, installed TC as recommended, but grub cannot find the boot files of TC, and I also lost the opportunity to boot my XP...
I must have set up grub incorrectly. Could you help me configure grub to give me the option of booting windows, too? And how could I check what went wrong with the setup of booting TC?
I have now 1 hd with 3 partitions:
1 - for Win XP, bootable
2 - for data
3 - for Linux
On startup, grub immediately starts up, offering to boot TC, but it cannot fin the files specified. I guess it searches on the wrong partition
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: curaga on September 06, 2009, 03:04:08 AM
Post your menu.lst?

Also, bzImage has a capital i, many others have made a typo there.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: alu on September 06, 2009, 09:04:37 AM
got it from ntfs with grub, but it is too much a pain; adszhu, in your menu.lst for windows, you must have the following lines:

title WinXP
rootnoverify
makeactive
chainloader +1

Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 06, 2009, 10:17:41 AM
adszhu

Here is the an example of the type of thing you need in /boot/grub/menu.lst
There can be some variations.

Use the correct partition numbers and letters.

default 0
timeout 5

title   Windows
root   (hd0,0)
makeactive
chainloader   +1

title   Tiny Core
root   (hd0,2)
kernel   /boot/bzImage quiet tce=hda3 home=hda3 max_loop=255
initrd   /boot/tinycore.gz

If you still can't get it working, post more details about what you have done.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 06, 2009, 11:51:18 AM
Thanks a lot, guys, your help is extraordinary valuable to me! Gonna try these tips in minutes
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 06, 2009, 03:52:18 PM
OK, Win XP boots fine with Grub!! Thanks for the menu.lst instructions!
However, TC still don't want to boot, saying files cannot be found...
Now I have exactly the same menu.lst Guy recommended:
efault 0
timeout 5

title   Windows
root   (hd0,0)
makeactive
chainloader   +1

title   Tiny Core
root   (hd0,2)
kernel   /boot/bzImage quiet tce=hda3 home=hda3 max_loop=255
initrd   /boot/tinycore.gz

How could I check if the files are there, and if Grub is set up correctly?
Just a small additional info:
Following TC install instructions, I started by downloading the ISO. I noticed it contained v2.3, but it did not start the GUI, so I returned to booting by netboot, which loads v2.2. I have performed all steps described in the install guide successfully, copying the files from the live CD of v2.3...
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 07, 2009, 10:23:55 AM
If Windows boots OK, this indicates that Grub is set up OK.

It is difficult to know what you have done.

Check that you have typed it correctly. If you have one spelling mistake, it won't work.

What partition is Tiny Core in?

If it is in hda3 (IDE hard drive - older computers), you use:

title   Tiny Core
root   (hd0,2)
kernel   /boot/bzImage quiet tce=hda3 home=hda3 max_loop=255
initrd   /boot/tinycore.gz

If it is in sda3 (SATA hard drive - newer computers), you use:

title   Tiny Core
root   (hd0,2)
kernel   /boot/bzImage quiet tce=sda3 home=sda3 max_loop=255
initrd   /boot/tinycore.gz

If it is in hda2 you use:

title   Tiny Core
root   (hd0,1)
kernel   /boot/bzImage quiet tce=hda2 home=hda2 max_loop=255
initrd   /boot/tinycore.gz

You will notice the Grub number (following root) is one less than the Linux number (following kernel - two places).

Try different numbers. If it doesn't work, let us know what partition Tiny Core is in.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 07, 2009, 11:30:38 AM
Hi Guy,

good point: my TC is on sda3, I have changed the config accordingly:
root (hd0,2)
kernel /boot/bzImage quiet tce=sda3 home=sda3 max_loop=255
initrd /boot/tinycore.gz

however, it still cannot find the file...
Is therea file browsing extention available? MC or similar... I would check if the file is really there, etc
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 07, 2009, 11:38:12 AM
Are you running from the live CD, and connected to the internet?

If you are, you could install Xfe file manager and use that to see what is there.


You can also do it from the terminal.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 07, 2009, 11:50:25 AM
Not from live CD but from netboot.
Thanks, i give it a try
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: roberts on September 07, 2009, 12:46:43 PM
Does using grub's builtin find command help?

From grub boot menu, enter 'c' to get grub command prompt
grub>

grub> find (hd0,2)/                  then press tab to see files, look for boot

Change drive specification untll you find the boot directory containing the stage... files and menu.lst
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: combo3 on September 07, 2009, 02:04:15 PM
Not from live CD but from netboot.

Run fdisk -l from a terminal and post what devices you have installed.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 07, 2009, 02:59:45 PM
Roberts: following your instructions it seems the files are there:
find (hd0,2)/boot/
  Possible files are grub bzImage microcore.gz

There is a subdir in this directory, too, that I can see in Xfe, as Guy recommended. It is called grub, which contains 15 items, among others the menu.lst, stage1, stage2 and stage2_eltorito

Is it OK?
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: roberts on September 07, 2009, 03:15:13 PM
What happens when you use the 'e' command to temporarily edit the Tiny Core grub kernel line and remove tce=hda3 home=hda3 max_loop=255 and try booting, what do you see?

Also, is this a flash device? If so, you will need to add waitusb=5 to your boot options.
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: Guy on September 07, 2009, 03:55:02 PM
The commands above are for Tiny Core.

If you are using microcore, you need to use

initrd   /boot/microcore.gz


also see

/microcore.html][removed due to policy violation]/microcore.html (http://[removed due to policy violation)
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 08, 2009, 02:36:30 AM
Oops, that's it! Accudentally, I copied the files of micro core instead of tc!
Let's start from the beginning...
Title: Re: Optionally boot TC, XP or Ubuntu
Post by: adszhu on September 08, 2009, 03:52:23 AM
Of course it works now :)

Thanks a lot for all the help!

Have a nice day, guys