Installing ZeroShell in Hard Disk

Forums Network Management ZeroShell Installing ZeroShell in Hard Disk

  • This topic is empty.
Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
  • #45137

    while trying to setup my CF with this method…
    CF is vfat/fat32 and it couldnt b properly formatted as ext2… dunno why.

    1st problem got at
    cp -rp * ..
    it refuses to copy a bunch of filles and dirs due 2 permissions…

    @fergon wrote:

    Now the system is ready, only rest to make it bootable. With grub, append in /boot/grub/menu.lst
    title ZeroShell
    root (hd0,4)
    kernel /isolinux/vmlinuz quiet root=/dev/ram2 ramdisk_size=131072 init=/bin/init
    initrd /isolinux/initrd.gz

    i guess one just need to type grub and type it line by line?
    but at line initrd /isolinux/initrd.gz it said “file too big to fit in memory”…

    anyway i’m curios if it could work with fat32 fs?


    don’t have executable permission on menu.lst?
    i.e. chmod +x /boot/grub/menu.lst
    vi /boot/grub/menu.lst

    You could also try sudo, but I didn’t have to do that.

    also try

    /bin/cp * -f -r -a -p /destinationFolder

    I’m not sure why your getting not fitting into memory, but oh well.

    And the post on physdiskwrite, I saw that posted somewhere else on the net before it ended up in the forum (help docs) jumped all over it. It is a nice tool to have, but they also have dd for windows, which I couldn’t get to work

    But that defeats the purpose anyways. Because it’s still a read-only OS essentially. All changes are lost on reboot.


    thanx for reply, i’ll try it.
    well, what gonna happens if you’ll do:

    /dev/cdrom /cdrom ext2 defaults 0 0

    i mean no ro attr for cdrom device?
    im Interesting what i should write here if i have fat32 insead of ext2 – vfat or fat32?

    and about the physdiskwrite – i did try it but it doesnt write to my CF. It was just dumb time loose with no changes in CF.


    The default line is

    /dev/cdrom              /cdrom              iso9660 ro 0 0

    I don’t think it is possible to install it on fat/fat32. By default when you write the image on the disk, the contents are overwritten and replaced, so you end up with partitions and filesystem contained in the image.


    @ppalias wrote:

    The default line is

    /dev/cdrom              /cdrom              iso9660 ro 0 0

    but you were change it in your tutor to:

    /dev/cdrom /cdrom ext2 ro 0 0

    . So i was guessing you mean than this “cdrom” is really hda5 due to ext2 fs and cause there is no hda5 devices described at all. So you can write just rw instead of ro.
    Anyway i got the bootup menu with my fat32 formatted CF using the handy tool Universal USB Installer. but when it tries 2 boot it searches for CDROMs (i c the Probing CDROM msgs) but there is no any connected. So it gives up and hangs with kernel panic bla-bla-bla something about VFS and block(1,2)…
    Im working now on initrd.gz and rootfs changes (iso’s original used for now). Dunno if it helps me out…
    PS It is the 3rd day im trying to install ZS to CF with no result… im not sure about my patience….


    well fat32 fs really doesnt supportd by kernel and i got corresponding msg at boot. damn!
    What should i do now?
    CF refuses any fs except fat32. I did partitions using fdisk and cfdisk with writing changes but fat32 and all the CF’s files was accessible after that. So i cant format it in any other fs… no ext2 – no ZS. its a deadlock and it drive me nuts!


    At last!
    The key is CF need to b not partitioned at all just like HDD. But that is the thing which i couldnt do for a long time. Every time i boot linux CF mounts as hdc1(ZS) or sdb1(slax). But with no partitions it would b just hdc or sdb without any digit.
    I had a problem with unpartitioning my CF. But somehow under ZS booted from CD and with help of fdisk/cfdisk (4 weird ghost partitions was deleted) i get ability to deletethe main partition but in WinXP! Or i just dont know how2 do it in linux cause fdisk/cfdisk was unable to do it. And i did it in WinXP with admin tools. After that i boot ZS from CD again and my CF was seen by fdisk -l like /dev/hdc (not hdc1 like it was b4) and i did gunzip -c ZeroShell-1.0.beta13-CompactFlash-IDE-USB-SATA-1GB.img.gz>/dev/hdc from usb-stick and tada! it works now!

    And the same with HDD – before boot any live linux and doing anything like dd or gupzip>/dev/hdd you must kill all the partitions on this HDD. But with HDDs its much easier 2do. Even with admin tools in WinXP or with any partitioning soft.

    Yes, linux is free but it takes a lot of your time…


    If you are experiencing the “kernel panic” message and you ‘re using a SATA hard disk, try to put the SATA operation in Legacy mode (disable RAID) from the boot menu (hit F2 while booting). This solved all my problems!

    bumbakashe’s solution didn’t work for me. Try the instructions at: How to install ZeroShell on Hard Disk



    I’ve tried to install ZS2.0RC1 to hdd using instruction in 1st post.
    But I couldn’t mount ungzipped initrd:

    #mount -t auto -o loop initrd.unzip initrd.folder
    #mount: you should specify the filesystem type

    When i specify ext2 or ext3 fs manually it says “wrong fs type”


    It seems that ZS2RC1 doesn`t recognize FAT32 and NTFS filesystems. Try to boot from zs1b16 CD and it works. I installed 2RC1 this way successfully.


    Hello all. Here my way to install ZS2.0 on HDD. Root folder is located on Hdd
    Boot from your favorite liveCD linux (I’ve used knoppix 6.7) and execute the next steps:

    1. Install ZS2.0 in the usual way, as described here or on
      Then you must delete 2nd and 3rd partitions (all except 1st boot partition) and create your own partitions (ext3 and ext4 fs are supported)
    2. Create tmp folders:
      mkdir sda1
      mkdir sda2
      mkdir usb
      mkdir iso
      mkdir rootfs.dir
      mkdir initrd.dir

      and mount partitions to it:
      in my case HDD was /dev/sda, usb flashdrive – /dev/sdb and ZS2.0RC1 livecd iso image filename is ZeroShell-2.0.RC1.iso. You can find out flashdrive device name using dmesg or fdisk -l commands

      mount /dev/sda1 sda1
      mount /dev/sda2 sda2
      mount /dev/sdb1 usb
      mount -o loop usb/ZeroShell-2.0.RC1.iso iso
    3. Copy all files and directories from previously mounted iso image to sda2:
      copy -arp iso/* sda2
      rm -f sda2/isolinux
    4. Unpacking rootfs to hdd:
      gunzip -c iso/isolinux/rootfs > rootfs
      mount -o loop rootfs rootfs.dir ##mount unpacked rootfs ext2 image
      cd rootfs.dir
      find . -maxdepth 1 -type l -delete ##Deleting softlinks
      cp -arp ./* ../sda2
      cd ../
    5. Also we need to edit sda2/etc/fstab:
      /dev/sda2      /              ext3      defaults     1    1
      /dev/sda1 /boot ext2 defaults,ro 0 0
      proc /proc proc defaults 0 0
      none /sys sysfs remount 0 0
      devpts /dev/pts devpts gid=4,mode=620 0 0
      shm /dev/shm tmpfs defaults 0 0
      usbfs /proc/bus/usb usbfs defaults 0 0
    6. modification of initrd.img
      gunzip -c sda1/initrd.img > initrd.dir/initrd
      cd initrd.dir
      cpio -id < initrd

      Edit initrd.dir/init script (I wrote only changed strings here):

      ##   if [ "$root" = ISO ] ; then
      # echo "Mounting ISO image ..."
      # mkdir /cdrom
      # if mount "$device" /cdrom 2>/dev/null ; then
      # echo -n "Loading root filesystem into RAM device... "
      # if gzip -dc /cdrom/i#solinux/rootfs >/dev/ram2 2>/dev/null ; then
      # echo Success
      # umount /cdrom
      # #/sbin/insmod /lib/loop.ko
      mount $device /.root
      cd /.root/dev
      ln -sf $device cdrom
      cd /
      mount /.root/dev/cdrom /.root/cdrom 2>/dev/null
      sleep 3
      echo "Successfully mounted device $device"
      #umount /cdrom
      # else
      # echo "Wrong ISO filesystem found"
      # umount $device > /dev/null
      # while true ; do sleep 10000 ; done
      # fi
      # else
      # echo "Failed to mount the Live CD"
      # while true ; do sleep 10000 ; done
      # fi
      # else
      # if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then
      # no_mount $device
      # cat /proc/partitions
      # while true ; do sleep 10000 ; done
      # else
      # echo "Successfully mounted device $device"
      # fi
      # fi

      pack new initrd and replace the original with it:

      rm -f initrd
      find -print | cpio -o -H newc | gzip -c9 > ../sda1/initrd.img

    That`s all. Reboot and try ti boot from hdd


    After all described in the previous post I`ve successfully logined to web interface/
    But there were some moments I want to clarify to:
    1. When booting:

    mount: according to mtab, /dev/sda2 is already mounted on /

    When I commented out “/dev/sda2 / ext3 defaults 1 1 ” in /etc/fstab – the same


    Thank you for this post.
    I used this to unpack zeroshell on a spare partition from linux.
    I had to do a few things differently.
    Like the root partition just was just a tar file I did not have to ‘mount’ it.

    unlink /lib/modules 

    ln -s /lib/modules /modules
Viewing 14 posts - 16 through 29 (of 29 total)
  • You must be logged in to reply to this topic.