This is the old SliTaz forum - Please use the main

How to use Slitaz installed on HDD without using the rootfs?
  • colbencolben February 2010
    I installed slitaz to HDD following the manual and everything works fine - result is rw access to my ext3 partition on /dev/sda3, but when I type "mount" the output is as follows:

    rootfs on / type rootfs (rw)
    /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    tmpfs on /dev/shm type tmpfs (rw,relatime)
    usbfs on /proc/bus/usb type usbfs (rw,relatime)

    My question is if there is a possibility to not use this "rootfs" thing and have a usual mount to ext3 which would correspond with fstab entry like:
    /dev/sda3 / defaults 0 2

    I was trying to comment out rootfs mounts in /etc/init.d/rcS, but wasn't sucessful. Where gets the rootfs mounted? Is there any possibility to not mount it and do a normal mount from ext3?

    And bonus question:
    rootfs on / type rootfs (rw)
    /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)

    How the current mount (above) works, is there any ramdisk in use?

    Thanks for help

  • LuXLuX February 2010
    Hello Colben,

    in order to install of Slitaz in your HDD as a "normal" file system (not a compressed one in rootfs.gz), you have to extract the content of the rootfs.gz using lzma an cpio as explained here:

  • colbencolben February 2010
    Thanks for reply, Lux, I tried to do manual install and the result is the same as is with install using some tool provided by slitaz...working rw filesystem, but mount still gives me

    rootfs on / type rootfs (rw)
    /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)

    instead of desired /dev/sda3 on / (rw)

    the system behaves as a usual ext3 mount as root partition, but output of mount command seems suspicious to me. I am thinking about all this stuff, because I have a suspicion that I am losing some files and that simply the filesystem is more unstable than a usual mount in other linux distros.
  • LuXLuX February 2010
    Hello Colben,

    sorry, I'm realising that I misunderstood your initial post. I have the same output of "mount" command as you, with my Slitaz-Cooking installed on /dev/hda7.

    This being said, I can't see exactly why this "mount" output seems suspicious to you. It must be for some reason I'm unfamiliar with, so I will stop here to write probably irrelevant comments. The only thing I can say is that with my Slitaz-2.0 installed on /dev/hda9 I'm using various personnal entries in /etc/fstab (including an fusermount entry) without any particular problem.

    Best regards,

  • johnlumbyjohnlumby February 2011
    I would also really like to know the answer to this question.    Does someone know?

    The question concerns a Slitaz that is installed on HDD,  and how the root filesystem works.
    I know part of the answer but would really like to understand the thinking behind it.

    Firstly, in referring to mount output as given by Colben earlier,
    the rootfs filesystem type is simply what the VFS component of the kernel calls the root filesystem when it first mounts it,   before it know anything about it other than the basic block device major and minor and so on.    I'm not sure about /dev/root but I *think* that is another kernel "funny" name that it uses to refer to the device on which the root fs is mounted,  before it knows that this device is /dev/hdxx or /dev/sdxx

    So what we see in mount output implies that the kernel never switched the root over to the "on-HDD" device later on in boot,  as normal kernels do   -  it is still set up as it was in that very early state of kernel VFS .

    But now the real questions:

      1)  why did the slitaz HDD installer not set up the root fs mount in the conventional way in the fstab,  specifying the /dev/hdxx or /dev/sdxx?
      2)  if I add a /dev/hdxx or /dev/sdxx entry myself manually to the ./etc/fstab,  slitaz ignores it (or rather, it can't remount root on my specified device as it's busy).    This differs from how vanilla kernel switches the root device from ro to rw and puts it on the device in fstab
      3)   when slitaz on HDD is up and running,  is root fs actually in memory (ramfs?   tmpfs?) or on the HDD?  I think it is on HDD but no way to be sure.
      4)   If it is in memory,   what writes the changes back to the HDD at shutdown ?
                      (I did not dare put this to the test by crashing it and seeing if all changes lost)
       5)  and lastly,   what code is doing all this?   I guess it has to be some kernel patch?

    Everything is working fine and I am really impressed by Slitaz,   it is fast and very functional,   but this strangeness about the rootfs after installing it to HDD is mysterious.

    John Lumby
  • johnlumbyjohnlumby February 2011
    Well,  I can answer some of my own questions:

    1) and 2)   I *think* this is all down to the limited functionality of the version of mount in slitaz.   I *think* it does not use /etc/mtab.   I see that on my system,  /etc/mtab is a symlink to /proc/mounts,  but even if I change that to a file and manually enter the correct mount information into it,  mount still reports the same roots info from /proc/mounts.
    3)  It's on the HDD,  and the best way I have found to query which HDD partition it's mounted on is this klugdy thing:
        set `dmesg | grep "^VFS: Mounted root"`;major="${9%:*}"; minor="${9#*:}"; minor="${minor%.}";ls -l /dev/* | grep -E "${major}, +${minor} ";
    5)  no code is doing it,  it's just that mount is not keeping track of its own mounts from fstab

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