Tiny Core Linux

Off-Topic => Off-Topic - Tiny Tux's Corner => Topic started by: b3b on March 04, 2012, 11:25:00 AM

Title: mbd, boot live from USB
Post by: b3b on March 04, 2012, 11:25:00 AM
Hi folks! A little announcement here.

mbd is collection of scripts, for loading live Linux CD images from USB drive.
No special partition creation and *.iso "installation" is required.

Main job is done in friendly Linux environment.
NetbootCD (TCL based live CD, with kexec powers) is used.

It is posible to boot 4.0 and 4.2, 4.3 TCL with this stuff.
For 4.2 some modifications was done, since X become an extension and tce directory is a need for the first run.

Project on github.com: /b3b/mbd  (not allowed to post external links).

Welcome your comments!
Title: Re: mbd, boot live from USB
Post by: bernhard on March 06, 2012, 08:12:03 AM
Hi,

this is interesting, but I would prefer not having to modify my boot loader. 
You say that make install will install syslinux.

I am currently using Grub Legacy with the following menu entry (from a usb stick):

title CorePlus - chainload ISO image via memdisk
kernel /boot/grub/memdisk iso
initrd /TinyCore/CorePlus-4.3.1.iso

that runs not bad, but it does not load any extensions due to the fact that CorePlus does not know where its iso is ...

regards
   Bernhard
Title: Re: mbd, boot live from USB
Post by: roberts on March 06, 2012, 10:37:20 AM
If one is trying to run directly from a single iso image file then the following would be required to extract any iso included extensions:

Example for YUMI on sda1 and assuming that you have a tce directory setup on a writable drive. Use
tce-setdrive for easy setup

1. Make dir to mount the iso,
    mkdir /mnt/image
2. mount /mnt/sda1
3. mount -t iso9660 -o ro /mnt/sda1/multiboot/ISOS/TinyCore-4.4.iso /mnt/image
4. cp -a /mnt/image/cde/* /etc/sysconfig/tcedir

reboot
Note may need to add waitusb=5 for slow devices, or if forget that then after boot use
tce-setup

If there is enough interest I can add this procedure as an option to tce-setdrive.
Title: Re: mbd, boot live from USB
Post by: bernhard on March 06, 2012, 11:29:55 AM
Dear Robert,

thanks for the hints. I'm referring to memdisks ability to use an image (iso, floppy or hd) as an initrd (see http://www.syslinux.org/wiki/index.php/MEMDISK#Linux and or http://www.syslinux.org/wiki/index.php/MEMDISK#Supported_image_types) without the need to loopback mount the image and copy its contents.

As far as I understand, it could be automated with the help of phram and mtdblock kernel modules and the utility memdiskfind from the syslinux package.

regards
   Bernhard
Title: Re: mbd, boot live from USB
Post by: b3b on March 06, 2012, 02:54:41 PM
Maybe boot time option to search mountpoints for iso can be useful?
For example:
    cde=my-images-dir/TCL/CorePlus-4.2.iso

Hi,

this is interesting, but I would prefer not having to modify my boot loader. 

I will add an option to omit Syslinux installation.
Title: Re: mbd, boot live from USB
Post by: bernhard on March 07, 2012, 03:04:41 AM
Quote
Maybe boot time option to search mountpoints for iso can be useful?
For example:
    cde=my-images-dir/TCL/CorePlus-4.2.iso

absolutely ...


Quote
I will add an option to omit Syslinux installation.

thanks in advance ...
Title: Re: mbd, boot live from USB
Post by: b3b on March 10, 2012, 04:30:12 AM
"--without-bootloader" option is added, so it is possible to use mbd with the existent bootloader.
Title: Re: mbd, boot live from USB
Post by: roberts on March 10, 2012, 11:49:28 AM
If one is trying to run directly from a single iso image file then the following would be required to extract any iso included extensions:

Example for YUMI on sda1 and assuming that you have a tce directory setup on a writable drive. Use
tce-setdrive for easy setup

1. Make dir to mount the iso,
    mkdir /mnt/image
2. mount /mnt/sda1
3. mount -t iso9660 -o ro /mnt/sda1/multiboot/ISOS/TinyCore-4.4.iso /mnt/image
4. cp -a /mnt/image/cde/* /etc/sysconfig/tcedir

reboot
Note may need to add waitusb=5 for slow devices, or if forget that then after boot use
tce-setup

If there is enough interest I can add this procedure as an option to tce-setdrive.
I have made this into a boot time option and will be 4.4rc3.
Can be as simple as iso=sdb1 and a search will be performed or complete path such as:
iso=/mnt/sda1/multiboot/ISOS/TinyCore-4.4.iso
Title: Re: mbd, boot live from USB
Post by: bernhard on March 10, 2012, 12:35:23 PM
Hi Robert,

thanks very much for the improvement & for the complete distribution

Bernhard
Title: Re: mbd, boot live from USB
Post by: roberts on March 10, 2012, 01:23:16 PM
Just a note on this feature. I only support one automatically found iso. That is because our boot is not interactive. So if using YUMI with many isos you will have to use the full path option.
Title: Re: mbd, boot live from USB
Post by: bernhard on March 11, 2012, 06:17:08 AM
Hi Robert,

it looks good, having both, a tce directory and two iso images (CorePlus-4.3.1.iso and
CorePlus-4.4rc3.iso) on the usb stick, I added two options (i.e. waitusb=5 and
iso=sdb1/TinyCore/CorePlus-4.4rc3.iso) to the command line. During boot, it tried to
load (first) my extensions from the tce directory (with problems, they are for 4.2.1) and
then the embedded extensions from CorePlus-4.4rc3.iso.

I guess this behaviour is expected, I'll try to rename the extension directory for a check.

regards
    Bernhard
Title: Re: mbd, boot live from USB
Post by: Rich on March 11, 2012, 06:38:48 AM
Hi bernhard
If you don't specify a  tce  directory, Tinycore scans the system and uses the first one it finds.
Title: Re: mbd, boot live from USB
Post by: bernhard on March 11, 2012, 07:36:55 AM
If you don't specify a  tce  directory, Tinycore scans the system and uses the first one it finds.

ok, thanks I wasn't  sure about that.

If I rename my extension directory from tce to old-tce, and add iso=sbd1 it neither
loads the extensions from the usb stick nor it finds the iso image (and accordingly
does not have any extensions at all).

But when I specify the complete path iso=sdb1/TinyCore/CorePlus-4.4rc3.iso it
loads "onboot.lst from embedded cde directory."

regards
   Bernhard
Title: Re: mbd, boot live from USB
Post by: Rich on March 11, 2012, 07:46:29 AM
Hi bernhard
Just a guess on my part, but when you specify  iso=sdb1, maybe it only checks the root directory.
Quote
and add iso=sbd1 it neither
Unless of course you actually typed   iso=sbd1   instead of   iso=sdb1.
Title: Re: mbd, boot live from USB
Post by: bernhard on March 11, 2012, 07:54:33 AM
Hi Rich,

Unless of course you actually typed   iso=sbd1   instead of   iso=sdb1.

I cannot see any difference between the two ...

but I'll try your guess ...
Title: Re: mbd, boot live from USB
Post by: Rich on March 11, 2012, 08:03:24 AM
Hi bernhard
sbd1 != sdb1
Title: Re: mbd, boot live from USB
Post by: bernhard on March 11, 2012, 08:07:31 AM
sbd1 != sdb1
oops, yes, as far as I remember there was a perception test for exactly this one :-)

And apparently Roberts hint was completely correct. If there is anywhere another iso
image anywhere on the drive, it is necessary to specify the full path explicitely. For
ease of typing I had renamed CorePlus-4.4tc3.iso to CorePlus.iso and moved it to the
root. But there was another image named A2.iso in the root. I moved that to a
subdirectory without renaming it to a different extension. This did not work.

With
    iso=sdb1
no extensions are found and it boots to the command prompt, when there is yet
another iso image in another directory, but if that iso image is also renamed to
a different extension, it is found and the extension are loaded.

Almost identical to specifying the full path, i.e.  the following additional options
    iso=sdb1/CorePlus.iso waitusb=5 kmap=qwertz/de-latin1

regards
    Bernhard
Title: Re: mbd, boot live from USB
Post by: coreplayer2 on March 13, 2012, 12:59:02 PM
If one is trying to run directly from a single iso image file then the following would be required to extract any iso included extensions:

Example for YUMI on sda1 and assuming that you have a tce directory setup on a writable drive. Use
tce-setdrive for easy setup

1. Make dir to mount the iso,
    mkdir /mnt/image
2. mount /mnt/sda1
3. mount -t iso9660 -o ro /mnt/sda1/multiboot/ISOS/TinyCore-4.4.iso /mnt/image
4. cp -a /mnt/image/cde/* /etc/sysconfig/tcedir

reboot
Note may need to add waitusb=5 for slow devices, or if forget that then after boot use
tce-setup

If there is enough interest I can add this procedure as an option to tce-setdrive.

You bet there is interest :)

On one of my remaster's of tinycore, I use a script which mounts everything, searches for necessary tools and loads them without prompting, then cleans up by unmounting all devices.  By the time TinyCore finishes booting, we have a desktop with all the tools we could need ready for use. 
Title: Re: mbd, boot live from USB
Post by: coreplayer2 on July 07, 2012, 12:58:44 PM
Quote
I have made this into a boot time option and will be 4.4rc3.
Can be as simple as iso=sdb1 and a search will be performed or complete path such as:
iso=/mnt/sda1/multiboot/ISOS/TinyCore-4.4.iso


With my latset appreciation for Labels,  is this supported also? eg

iso=LABEL=<MyLabel>
or
iso=LABEL=<MyLabel>/mnt/sda1/multiboot/ISOS/TinyCore-4.5.6.iso