WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: mbd, boot live from USB  (Read 14094 times)

Offline b3b

  • Newbie
  • *
  • Posts: 3
mbd, boot live from USB
« 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!

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #1 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

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mbd, boot live from USB
« Reply #2 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.
10+ Years Contributing to Linux Open Source Projects.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #3 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
« Last Edit: March 07, 2012, 07:55:52 AM by bernhard »

Offline b3b

  • Newbie
  • *
  • Posts: 3
Re: mbd, boot live from USB
« Reply #4 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.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #5 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 ...

Offline b3b

  • Newbie
  • *
  • Posts: 3
Re: mbd, boot live from USB
« Reply #6 on: March 10, 2012, 04:30:12 AM »
"--without-bootloader" option is added, so it is possible to use mbd with the existent bootloader.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mbd, boot live from USB
« Reply #7 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
10+ Years Contributing to Linux Open Source Projects.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #8 on: March 10, 2012, 12:35:23 PM »
Hi Robert,

thanks very much for the improvement & for the complete distribution

Bernhard

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: mbd, boot live from USB
« Reply #9 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.
10+ Years Contributing to Linux Open Source Projects.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #10 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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: mbd, boot live from USB
« Reply #11 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.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #12 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
« Last Edit: March 11, 2012, 07:50:16 AM by bernhard »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: mbd, boot live from USB
« Reply #13 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.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 73
Re: mbd, boot live from USB
« Reply #14 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 ...