This is the old SliTaz forum - Please use the main

how to boot Slitaz from the iso located on the hard disk using GRUB2?
  • florastephanieflorastephanie February 2011

    This thread is a follow-up of my other thread,

    - I have LUBUNTU on my laptop, and i want to install SLITAZ next to it OR instead of it.
    - my CD reader can not read cds on boot anymore, but it erroneously works now and then
     and is even able to read cds within my Lubuntu.
    - my floppy drive is something of the past
    - my laptop can read usbs, but only within the operating system that calls for it 
    (there is no USB bios entry on boot)
    - It has a working LAN port, but I have been unsuccessful in setting up a PXE server (which needs, as it seems, at least a functional-on-boot floppy-drive, cd-reader, or usb)

    So I figured to make slitaz boot from iso within the hardisk through a custom menuentry in GRUB2 that came along with LUbuntu.
    And collected little pieces of code from here and there on Internet.
    I could be on the right track now, but I'm not a programmer
    I placed slitaz-3.0.iso in this Lubuntu directory: /boot/slitaz
    and here is my edit of /etc/grub.d/40_custom of my LUbuntu

    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    menuentry "slitaz-3.0" {
           insmod part_msdos
           insmod ext2
           set root='(hd0,msdos1)'
           echo    'Loading slitaz-3.0...'
           loopback loop (hd0,msdos1)/boot/slitaz/slitaz-3.0.iso
           search --no-floppy --fs-uuid --set 33dcaca6-662f-4de2-9c83-733298bcb484
           linux   (loop)/boot/bzImage iso_filename=/boot/slitaz/slitaz-3.0.iso ramdisk_size=100000 rw 

    root=/dev/ram0 vga=normal autologin
           echo    'Loading initial ramdisk ...'
           initrd  (loop)/boot/rootfs3.gz

    and here's what it gives me when I load it from the grub list:

    Decompressing Linux.......

    fast windows scrolling one after another, the usual slitaz load i suppose
    until it reaches this screen: (Note that I used trailing dots to save time copying word by word from the 

    laptop screen)

    Using IPI No-shortcut mode
    input : AT Translated Set2 keyboard as /devices/................/input1
    input : PS/2 Mouse as /devices/................../input2
    input: AlpsPS/2 ALPS GlidePoint as /devices/input3
    List of all partitions:
    0300 19535040 hda driver: ide-gd
    0301 18672640 hda1
    0302             1 hda2
    0305      860160 hda5
    1600 4194302 hdc driver: ide-cdrom
    No filesystem could mount root, tried ext3 ext2 vfat iso9660 fuseblk xfs
    Kernel Panic - not syncing: VFS: unable to mount root fs on unknown-block(1,0)
    Pid:1, comm: swapper Not tainted #1
    Call Trace:
    [<c0419091>] ? printk+0xf/0x11
    [<c0418fe5>] panic+0x39/0xd6
    [<c0597b42>] mount_block_root+0x1eb/0x1ff
    [<...........>] ? sys_mknod+0x13/0x15
    [<...........>] mount_root+0x4c/0x54
    [<...........>] prepare_namespace+0x140/0x167
    [<...........>] kernel_init+0x148/0x157
    [<...........>] ? kernel_init+0x0/0x157
    [<...........>] kernel_thread_helper+0x7/0x10

    a thought just crossed my mind now is that maybe the slitaz-3.0.iso doesn't follow the iso9660 since the 

    latter could not load the former? 
    "No filesystem could mount root, tried ext3 ext2 vfat iso9660 fuseblk xfs"
    but most probably, i think it could be solved with a little tweeking of the menuentry settings

    Thanks in advance for your help
    Kindest Regards

  • florastephanieflorastephanie February 2011
    @mojo has posted the following on the other thread:
    This grub2(installed to usbkey MBR) isoboots /boot/slitaz/slitaz-3.0.iso on same usbkey:

    menuentry "SliTaz-3.0.iso" {
    loopback loop /boot/slitaz/slitaz-3.0.iso
    linux16 (loop)/boot/bzImage
    initrd16 (loop)/boot/rootfs.gz autologin

    To which, here was my reply:

    @mojo ,Thank you for your reply.
    Please correct me if I'm wrong, I understand that your method relies on plugging the usb on boot and allowing grub2 to run from it?
    If it's the case, then I don't think it would work:
    my laptop dates back to pre-2001 (toshiba Satellite 1800 )
    it has no bios entry to boot from USB,
    it can only see the usb from within the operating system.

  • michaelkbischofmichaelkbischof February 2011

    Just for being curious: why do you intend to try to boot slitaz from the USB stick, which is for old laptops a much more difficult taks? It is so small that you could with ease boot it from your harddisk with any proper configuration. And, as I recently learnt here, if you installed new programms with ,,tazusb writefs gzip" you can easily keep your improvements - the next time you just boot from this improved rootfs.gz.

  • florastephanieflorastephanie February 2011
    @michaelkbischof ,
    Thank you for your reply

    i don't intend to boot from usb [it is mojo's idea]. 
    As i said, i know it wouldn't work for me unless i discover in a miraculous way how to edit my bios! 
    my idea is, as you said, to boot it from the hard disk,
    I thought it clear when i said this:
    I placed slitaz-3.0.iso in this Lubuntu directory: /boot/slitaz
    and here is the my edit of /etc/grub.d/40_custom of my LUbuntu

    Anyway, I haven't quite understood what you mean when you say this:
    And, as I recently learnt here, if you installed new programms with ,,tazusb writefs gzip"
    is it about booting form usb or hardrive? :$

    Kindest Regards

  • michaelkbischofmichaelkbischof February 2011
    first I would learn how to boot ,,by hand" from a GRUB command line. 
    Then: for booting Slitaz all you need to have a directory like ,,boot.slitaz" on tthe Lubuntu partition. You just need in there 2 files:
    BzImage and rootfs.gz

    Then, with the old GRUB, you would boot it like:
    root (hd0,1)
    kernel /boot.slitaz/BzImage root=/dev/hda2 rw
    intrd /boot.slitaz/rootfs.gz

    and then type ,,boot"...

    After having done it you may install, for example, firefox and something else. Then you type this comand ,,tazusb writefs gzip" and wait (heavy CPU load, noise!). Then you see in 
    a new file names ,,rootfs.gz". Now you rename the rootfs.gz-file from which you booted to, e.g., ,,rootfs.orig.gz" and then you copy your new rootfs.gz to that ,,boot.slitaz"-dirrectory.
    The next time you boot as written above you will have firefox from the very start. But this new rootfs.gz is more than 32 MB, ;-)

    Have fun,

  • kultexkultex February 2011


    I dont recommand you to boot the iso - its better to mount and extract it to hda2 - see here

    and I recommand you to use stable and not cooking - its still buggy

    the grub entry in your Lubuntu for SliTaz  is then 

    title slitaz

    root  (hd0,1)

    kernel /boot/bzImage rw root=/dev/null vga=normal autologin   


    there is a howto for this, but is not available at the moment

    After you add home=/dev/sdxx , /dev/hdxx, or UUID to grub kernel line option to tazusb writefs is available to compress/save your filesystem in memory to disk prior to shutdown thereby saving installed programs.

  • florastephanieflorastephanie February 2011
    @michaelkbischof , thank you for your reply
    Note 1: You said:
    Then: for booting Slitaz all you need to have a directory like ,,boot.slitaz" on tthe Lubuntu partition. You just need in there 2 files:
    BzImage and rootfs.gz
    Do you mean those 2 files that are found in /boot in the iso SLitaz package?
    should I extract them manually and put them side by side next to slitaz-3.0.iso (for example in the boot.slitaz directory that you suggested)?
    Note 2: Now, I tried using "kernel" instead of "linux" but it would give me an error "you need to load kernel first". 
    I am on grub2, and I read it somewhere (if my memory doesn't fail me) that "kernel" is replaced with "linux" in the grub2 menuentry.  Is it the reason behind the error?

    Note 3:Thank you for the notes about the rootfs, 
    But to be honest with you, i have no intention of keeping slitaz as a custom grub entry,
    I need to hit 2 goals with a stone:
    My idea is that, by loading slitaz into RAM alone, without having Lubuntu mounted, 
    1- I can use its integrated Gparted to create a new partition 
    2- I can use the slitaz installer to install on that newly created partition

    @kultex , @Trixar_za 
    Thank you for your inputs, i have just searched the mirror and found this link:
    I suppose it is the one :)
    the problem is that i DON"T have a second partition yet,
    this is why i need to boot from iso first!
    I would appreciate it  though, if you suggest another way :$

    Kindest Regards
  • kultexkultex February 2011

    so put bzimage and rootfs.gz in /boot from Lubuntu and change the grub entry to

    title slitaz

    root  (hd0,0)

    kernel /boot/bzImage rw root=/dev/null vga=normal autologin   


  • michaelkbischofmichaelkbischof February 2011
    But she has Lubuntu with GRUB2!
    Under Lubuntu one is able to mount the iso-file to /mnt/loop.Then one can copy vmlinuz-2.6.xx-slitaz und rootfs.gz into the boot directory of Lubuntu, yes, and boot from there. She needs only only one boot! As she will use Gparted then and establish more partitions and she wants to install Slitaz to this harddrive using the Slitaz installer. She needs this workaround as
    - the cdrom does work
    - no floppy drive is available
    - and PXE cannot work as nothing is partitioned yet.
    But do not ask me for the right GRUB2 commands. This was the reason why I abandoned Ubuntu on another machine.

  • kultexkultex February 2011
    nothing... corrected the earlier post
  • OldGuyOldGuy February 2011
    Hi florastephanie,

     I just finished my writeup on howto use Slitaz 3.0 as a PXE-server. 
    As a special tread one could boot a PXE-client from this and furthermore install Slitas on this client.

    If you meet the following requirement, you couls serve as a beta tester (aka guinea pig) for this procedure. :-)

    1. second computer with a functional cd/dvd-drive
    2. a local network (cable not wireless) preferably with a simple hub/switch
    3. your laptop supports PXE netboot (may have to be enabled in the BIOS)

    If this is all ok we could use the second computer as a PXE-server, boot your laptop over the network from this server and directly install Slitaz on the laptop.

  • kultexkultex February 2011

    sorry, did not know, that there is such a big difference between grub and grub 2 the iso should be in /slitaz/ of hda1

    So adding an entry like the following to your grub config (/boot/grub/grub.cfg):

    menuentry "slitaz from harddisk (ISO = slitaz-3.0.iso)" {
      loopback loop (hd0,0)/slitaz/slitaz-3.0.iso
      linux (loop)/boot/bzImage isofrom=/dev/hda1/slitaz/slitaz-3.0.iso
      initrd (loop)/boot/rootfs.gz

    should work or just adpting that from mojo

    menuentry "SliTaz-3.0.iso" {
    loopback loop /dev/hda1/slitaz/slitaz-3.0.iso
    linux16 (loop)/boot/bzImage
    initrd16 (loop)/boot/rootfs.gz autologin

    could work to - try it out

  • florastephanieflorastephanie February 2011
    Thank you for your reply
    I have tried to make your input compatible with grub2,
    and replace "root" with "set root=",
    and replace "kernel" with "linux"
    as mentioned in this helpfile: section "creating the Custom Menu"
    so the following has led me to the same error screen that i got in my initial post of this thread
    menuentry "SLITAZ" {
     set root =(hd0,msdos1)
    linux /boot/slitaz/VMLINUZ_.6_S root=/dev/null vga=normal autologin
    same error shows when adding "iso_filename=/boot/slitaz/slitaz-3.0.iso" on the linux line 

    @michaelkbischof ,
    Thanks for your help, I think you grasped my point. But it's ok, you tried your best!

    Thank you for your post,
    I could serve as a guinea pig, as long as
    1. it doesn't harm the computer I'm working on now and 
    2. Lubuntu is the only OS on my laptop now, and I won't forfeit it as long as Slitaz is not fully installed!
    So answering your questions:
    1. I have 2 other computers: one Ubuntu 10.10, and one (please don't panic!) windows Xp
    2. I have a local network through a router, will it do?
    3. I think PXE netboot is enabled on my laptop: please check my post here:

    Kindest Regards
  • florastephanieflorastephanie February 2011
    @kultex, thank you for your reply :)
    i just wanted to mention a thing: grub.cfg is a read only, and is generated by a script that reads and compiles the files in /etc/grub.d folder.
    so after editing /etc/grub.d/40_custom,
    I run sudo update-grub

    either way, none of your menuentries worked for me....

    Kindest Regards
  • OldGuyOldGuy February 2011
    The operating systems of your other computers do not matter and will not be changed/modified as we will boot from a Slitaz LiveCD. :-)
    The local network should do, especially if no PXE/DHCP functionality is configured (as described in your other post)

    At the end of the procedure you'll have a Slitaz 3.0 running out of the RAM of your laptop.
    You're then able to run gparted and/or install Slitaz on a new partition.

    As the netbox utility on your LiveCD will most likely not work yet (I already did send a patch) you will have to use the manual way for that step (1.2)

    Here we go....

    Setup of an usable PXE Server
    With a few steps you can turn your Slitaz Host into a functional PXE-server to boot Thin-Client or to install Slitaz onto a PC which supports booting from a PXE-server. (e.g. BIOS netboot functionality)

    This servers will provide the following information to the PXE client
    - ip address, netmask, broadcast address, net address
    - TFTP-server address
    - bootfile name
    - optional: default gateway address
    - optional: dns server address

    This server will provide the files over the network, which the PXE-clients require to boot.
    - pxelinux.0
    - pxelinux.cfg/default
    - bzImage
    - rootfs.gz

    Note: The rootfs.gz file can also be replaced by other flavors.
            Memory requirements:
            rootfs.gz       144 MB
            rootfs-justx.gz  96 MB
            rootfs-loram.gz  80 MB
            rootfs-base.gz   48 MB
            rootfs-tiny.gz   24 MB
            rootfs.gpxe.gz   <- to boot via GPXE

    Setting up the PXE-server
    In this example we will use a Slitaz host (Slitaz 3.0 installed or host booted from Slitaz 3.0 live cd)
    (Make sure no other DHCP-server is running in this network. If you're not sure what your network environment looks like, ask the admin or setup a separate network with a small hub/switch or a cross-over cable)

    Boot the 'server to be' into Slitaz 3.0 or, if a different OS is installed, use a Slitaz 3.0 LiveCD to boot the system and log in.

    1. Configure the network interface (usually eth0) to operate with a static IP
       1.1 Start the Netbox Manager from the menu (de: System Tools/Configure networking)
           Select the 'Static IP' tab and configure your interface as required.
           If your all by yourself on the network the following should be a working setup:
           Interface : eth0
           IP        :
           Netmask   :
           Gateway   :
           DNS server:
           Klick on 'Start' button to initialize the network interface.
           Leave the Netbox Manager with the 'Quit' button.
       1.2 Optionally you can start a terminal, become root (enter 'su -' on a command line (e.g. xterm)), edit the /etc/network.conf file with an editor of your likings and restart the network with '/etc/init.d/ restart'.
           The following settings would be a working example:

  • OldGuyOldGuy February 2011
    2. Configure the TFTP-server
       2.1 Start the Server Manager from the menu (de: System Tools/Manage servers)
           Select the 'Inetd' tab of the Server Manager and click on the edit button next to the 'Configuration' field.
           Verify that the line regarding tftp has no '#' at the begining. Delete it if there is one.
           Also note the directory (/boot) at the end of the line. The TFTP-server will start there to look for the files required by TFTP-clients!
           Save the file, quit the editor and restart the Inet daemon by clicking on the 'Start' button.
           Don't quit the Server Manager yet as we still have to take care of the DHCP part.
       2.2 The advanced reader might become root, take an editor of her/his choice and verify/modify the /etc/inet.conf file. Thereafter restart the Inet daemon with the command '/etc/init.d/inet restart'

    3. Configure the DHCP to your requirements
       3.1 Select the 'PXE' tab and click on the edit button next to the empty 'Configuration' field.
           Close the empty editor.
           This will have added a few entries to your /etc/udhcpd.conf file (magical, isn't it :-) )
           Select the 'DHCP' tab and click in the edit button next to the 'Configuration' field.
           Now you can edit the DHCP-server to your requirements.
           Have a look especially at the following parameters:
             start  <- default
             stop  <- reduced from the default of 254.
             interface  eth0          <- Interface on which the DHCP-server should provide information.
             opt tftp   <- IP-address of your TFTP-server. In this example use the IP-address of eth0!
             router     <- enter the IP address of an existing router/gateway.
             dns        <- enter the IP address of an existing dns server.
             mtu        <- reduce the mtu to 1492 if you are connected to the Internet via PPPoE.
           To provide the boot file information to the PXE-clients, you should NOT use 'opt bootfile'!!
           Instead please mofify the 'boot_file' option which was added to the end of the udhcpd.conf file to read:
           boot_file pxe/pxelinux.0

    note: PXE preferes 'opt bootfile' over 'boot_file' but the TFTP-server will not find the file due to the fact that there is a 0xff appended to the filename.

           This is all for the udhcpd.conf file. Save the file, quit the editor and restart the DHCP server by clicking on the 'Start' button.
           Close the Server Manager by clicking on the 'Quit' button.
       3.2 Optionally you can start a terminal, become root, edit the /etc/udhcpf.conf file with the editor of your choice and restart the DHCP-server with 'killall -q udhcpd && /usr/sbin/udhcpd'.

  • OldGuyOldGuy February 2011
    4. Directories and Files
       Finaly we create the directory structure and gather the required files to enable a PXE-client to boot.
       4.1 From the menu start a xterm session and become root. (enter 'su -') The standard passwort is 'root'.
           Create the directory structure by entering the command 'mkdir -p /boot/pxe/pxelinux.cfg'.
           Be aware that 'pxelinux.cfg' is the name of a directory and NOT a file!!
       4.2 Copy the bzImage and rootfs.gz files from a Slitaz 3.0 live cd to the /boot/pxe/ directory or download them from a Slitaz mirror (e.g.
           If you want to use alternativ rootfs files, pls. download them also into the /boot/pxe/ directory.
       4.3 Create a file named 'default' in the /boot/pxe/pxelinux.cfg/ directory.
           The content of the file should read something like this:

           PROMPT 1

           LABEL core
             KERNEL bzImage
             APPEND initrd=rootfs.gz rw root=/dev/null vga=normal autologin

           LABEL justx
             KERNEL bzImage
             APPEND initrd=rootfs-justx.gz rw root=/dev/null vga=normal autologin

           LABEL gpxe
             KERNEL gpxe
             APPEND url=

           Obviously, you also would need to copy the files rootfs-justx.gz and gpxe to /boot/pxe/ to make the second and third menu entry work.
           Also, to boot via gpxe you also need to set the router and dns options in the /etc/udhcpd.conf file.

    5. Final preperations
       All file under /boot/pxe should have the rights set to '-rw-r--r--'. to do so execute the command 'chmod -r 644 /boot/pxe/*' as root within a xterm session.

    Finaly, boot your PXE-client and enjoy!!

    Let me know how it's going.

  • kultexkultex February 2011

    so how do you start Lubuntu ?

    sudo leafpad /boot/grub/grub.cfg


    sudo nano /boot/grub/grub.cfg

    does not work? what is the default editor of Lubuntu

  • kultexkultex February 2011

    and what you mean with - my floppy drive is something of the past

    Slitaz has a nice grub4dos floppy, but is also down - I found the floppy here -

    edit the menu.lst

    title Slitaz
    root (hd0,0)
    kernel /slitaz/bzimage rw root=/dev/null autologin vga=normal
    initrd /slitaz/rootfs.gz

    save default

    bzimage and rootfs.gz must be in the /slitaz directory of hda1

  • Trixar_zaTrixar_za February 2011

    Most of the sites are mirrored on there - you can also find the main website @
  • kultexkultex February 2011

    yes I found this:

    you can download the floppy images, but not the grub4dos floppy - this is not mirrored

  • betologybetology February 2011
    hello, this work for me on debian squeeze:
    addendum to file  /etc/grub.d/40_custom
    menuentry "slitaz test" {
      loopback loop (hd0,7)/slitaz/slitaz-aircrack-ng-20091124.iso
      linux    (loop)/boot/bzImage isofrom=/dev/sda7/slitaz/slitaz-aircrack-ng-20091124.iso boot=live quiet vga=791 noeject noprompt
      initrd   (loop)/boot/rootfs.gz
    then just update-grub2
    my slitaz-aircrack-ng-20091124.iso file is in partition 7, directory stilaz


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social