Mounting the Root File System into RAM

Hi,
I had been wondering, recently, how can one copy the entire root hierarchy, or wanted parts of it, into RAM, mount it at startup, and use it as the root itself.  At shutdown, the modified files and directories would be synchronized back to the non-volatile storage. This synchronization could also be performed manually, before shutting down.
I have now succeeded, at least it seems, in performing such a task. There are still some issues.
For anyone interested, I will be describing how I have done it, and I will provide the files that I have worked with.
A custom kernel hook is used to (overall):
Mount the non-volatile root in a mountpoint in the initramfs. I used /root_source
Mount the volatile ramdisk in a mountpoint in the initramfs. I used /root_ram
Copy the non-volatile content into the ramdisk.
Remount by binding each of these two mountpoints in the new root, so that we can have access to both volumes in the new ramdisk root itself once the root is changed, to synchronize back any modified RAM content to the non-volatile storage medium: /rootfs/rootfs_{source,ram}
A mount handler is set (mount_handler) to a custom function, which mounts, by binding, the new ramdisk root into a root that will be switched to by the kernel.
To integrate this hook into a initramfs, a preset is needed.
I added this hook (named "ram") as the last one in mkinitcpio.conf. -- Adding it before some other hooks did not seem to work; and even now, it sometimes does not detect the physical disk.
The kernel needs to be passed some custom arguments; at a minimum, these are required: ram=1
When shutting down, the ramdisk contents is synchronized back with the source root, by the means of a bash script. This script can be run manually to save one's work before/without shutting down. For this (shutdown) event, I made a custom systemd service file.
I chose to use unison to synchronize between the volatile and the non-volatile mediums. When synchronizing, nothing in the directory structure should be modified, because unison will not synchronize those changes in the end; it will complain, and exit with an error, although it will still synchronize the rest. Thus, I recommend that if you synch manually (by running /root/Documents/rootfs/unmount-root-fs.sh, for example), do not execute any other command before synchronization has completed, because ~/.bash_history, for example, would be updated, and unison would not update this file.
Some prerequisites exist (by default):
    Packages: unison(, cp), find, cpio, rsync and, of course, any any other packages which you can mount your root file system (type) with. I have included these: mount.{,cifs,fuse,ntfs,ntfs-3g,lowntfs-3g,nfs,nfs4}, so you may need to install ntfs-3g the nfs-related packages (nfs-utils?), or remove the unwanted "mount.+" entires from /etc/initcpio/install/ram.
    Referencing paths:
        The variables:
            source=
            temporary=
        ...should have the same value in all of these files:
            "/etc/initcpio/hooks/ram"
            "/root/Documents/rootfs/unmount-root-fs.sh"
            "/root/.rsync/exclude.txt"    -- Should correspond.
        This is needed to sync the RAM disk back to the hard disk.
    I think that it is required to have the old root and the new root mountpoints directly residing at the root / of the initramfs, from what I have noticed. For example, "/new_root" and "/old_root".
Here are all the accepted and used parameters:
    Parameter                       Allowed Values                                          Default Value        Considered Values                         Description
    root                                 Default (UUID=+,/dev/disk/by-*/*)            None                     Any string                                      The source root
    rootfstype                       Default of "-t <types>" of "mount"           "auto"                    Any string                                      The FS type of the source root.
    rootflags                         Default of "-o <options>" of "mount"        None                     Any string                                      Options when mounting the source root.
    ram                                 Any string                                                  None                     "1"                                                  If this hook sould be run.
    ramfstype                       Default of "-t <types>" of "mount"           "auto"                     Any string                                      The FS type of the RAM disk.
    ramflags                         Default of "-o <options>" of "mount"        "size=50%"           Any string                                       Options when mounting the RAM disk.
    ramcleanup                    Any string                                                   None                     "0"                                                  If any left-overs should be cleaned.
    ramcleanup_source       Any string                                                   None                     "1"                                                  If the source root should be unmounted.
    ram_transfer_tool          cp,find,cpio,rsync,unison                            unison                   cp,find,cpio,rsync                           What tool to use to transfer the root into RAM.
    ram_unison_fastcheck   true,false,default,yes,no,auto                    "default"                true,false,default,yes,no,auto        Argument to unison's "fastcheck" parameter. Relevant if ram_transfer_tool=unison.
    ramdisk_cache_use        0,1                                                              None                    0                                                      If unison should use any available cache. Relevant if ram_transfer_tool=unison.
    ramdisk_cache_update   0,1                                                              None                    0                                                     If unison should copy the cache to the RAM disk. Relevant if ram_transfer_tool=unison.
This is the basic setup.
Optionally:
    I disabled /tmp as a tmpfs mountpoint: "systemctl mask tmp.mount" which executes "ln -s '/dev/null' '/etc/systemd/system/tmp.mount' ". I have included "/etc/systemd/system/tmp.mount" amongst the files.
    I unmount /dev/shm at each startup, using ExecStart from "/etc/systemd/system/ram.service".
Here are the updated (version 3) files, archived: Root_RAM_FS.tar (I did not find a way to attach files -- does Arch forums allow attachments?)
I decided to separate the functionalities "mounting from various sources", and "mounting the root into RAM". Currently, I am working only on mounting the root into RAM. This is why the names of some files changed.
Of course, use what you need from the provided files.
Here are the values for the time spend copying during startup for each transfer tool. The size of the entire root FS was 1.2 GB:
    find+cpio:  2:10s (2:12s on slower hardware)
    unison:      3:10s - 4:00s
    cp:             4 minutes (31 minutes on slower hardware)
    rsync:        4:40s (55 minutes on slower hardware)
    Beware that the find/cpio option is currently broken; it is available to be selected, but it will not work when being used.
These are the remaining issues:
    find+cpio option does not create any destination files.
    (On some older hardware) When booting up, the source disk is not always detected.
    When booting up, the custom initramfs is not detected, after it has been updated from the RAM disk. I think this represents an issue with synchronizing back to the source root.
Inconveniences:
    Unison needs to perform an update detection at each startup.
    initramfs' ash does not parse wild characters to use "cp".
That's about what I can think of for now.
I will gladly try to answer any questions.
I don't consider myself a UNIX expert, so I would like to know your suggestions for improvement, especially from who consider themselves so.
Last edited by AGT (2014-05-20 23:21:45)

How did you use/test unison? In my case, unison, of course, is used in the cpio image, where there are no cache files, because unison has not been run yet in the initcpio image, before it had a chance to be used during boot time, to generate them; and during start up is when it is used; when it creates the archives. ...a circular dependency. Yet, files changed by the user would still need to be traversed to detect changes. So, I think that even providing pre-made cache files would not guarantee that they would be valid at start up, for all configurations of installation. -- I think, though, that these cache files could be copied/saved from the initcpio image to the root (disk and RAM), after they have been created, and used next time by copying them in the initcpio image during each start up. I think $HOME would need to be set.
Unison was not using any cache previously anyway. I was aware of that, but I wanted to prove it by deleting any cache files remaining.
Unison, actually, was slower (4 minutes) the first time it ran in the VM, compared to the physical hardware (3:10s). I have not measured the time for its subsequent runs, but It seemed that it was faster after the first run. The VM was hosted on a newer machine than what I have used so far: the VM host has an i3-3227U at 1.9 GHz CPU with 2 cores/4 threads and 8 GB of RAM (4 GB ware dedicated to the VM); my hardware has a Pentium B940 at 2 GHz CPU with 2 cores/2 threads and 4 GB of RAM.
I could see that, in the VM, rsync and cp were copying faster than on my hardware; they were scrolling quicker.
Grub, initially complains that there is no image, and shows a "Press any key to continue" message; if you continue, the kernel panics.
I'll try using "poll_device()". What arguments does it need? More than just the device; also the number of seconds to wait?
Last edited by AGT (2014-05-20 16:49:35)

Similar Messages

  • Zerofree: Shrinking ARCH guest VMDK--'remount the root file-system'?

    Hi!
    [using ZEROFREE]
    Getting great results with and extra ARCH install running as a VMDK in Workstation.
    REALLY need tips on shrinking the VMDK. obviously have deleted unneeded files
    and now rather urgently need to learn what's eluding me so far.
    1) zerofree is install IN the virtual machine (VMDK)workstation  running on windows 8.
    2) Here's the instructions for zerofree:
           filesystem has to be unmounted or mounted  read-only  for  zerofree  to
           work.  It  will exit with an error message if the filesystem is mounted
           writable.
           To remount the  root  file-system  readonly,  you  can  first
           switch to single user runlevel (telinit 1) then use mount -o remount,ro
           filesystem.
    As it a VMDK and it's running would the only/best option be to: "remount the  root  file-system  readonly" ??
    OR, could i add the VMDK to another running arch system that I do have and NOT mount the VMachine thereby
    allowing zero free to run even better on that?
    Are both method JUST as efficive at shrinking? My guess would be the remount root file-system as read only
    would NOT be as efficient at shrinking.
    I could really use a brief walk-through on this as all attempts have failed so far.
    I boot the ARCH virtual machine and do what may I ask?
    Last edited by tweed (2012-06-05 07:43:41)

    How did you use/test unison? In my case, unison, of course, is used in the cpio image, where there are no cache files, because unison has not been run yet in the initcpio image, before it had a chance to be used during boot time, to generate them; and during start up is when it is used; when it creates the archives. ...a circular dependency. Yet, files changed by the user would still need to be traversed to detect changes. So, I think that even providing pre-made cache files would not guarantee that they would be valid at start up, for all configurations of installation. -- I think, though, that these cache files could be copied/saved from the initcpio image to the root (disk and RAM), after they have been created, and used next time by copying them in the initcpio image during each start up. I think $HOME would need to be set.
    Unison was not using any cache previously anyway. I was aware of that, but I wanted to prove it by deleting any cache files remaining.
    Unison, actually, was slower (4 minutes) the first time it ran in the VM, compared to the physical hardware (3:10s). I have not measured the time for its subsequent runs, but It seemed that it was faster after the first run. The VM was hosted on a newer machine than what I have used so far: the VM host has an i3-3227U at 1.9 GHz CPU with 2 cores/4 threads and 8 GB of RAM (4 GB ware dedicated to the VM); my hardware has a Pentium B940 at 2 GHz CPU with 2 cores/2 threads and 4 GB of RAM.
    I could see that, in the VM, rsync and cp were copying faster than on my hardware; they were scrolling quicker.
    Grub, initially complains that there is no image, and shows a "Press any key to continue" message; if you continue, the kernel panics.
    I'll try using "poll_device()". What arguments does it need? More than just the device; also the number of seconds to wait?
    Last edited by AGT (2014-05-20 16:49:35)

  • Device id of the root file system changes

    I have noticed that sometimes the device id of the root file system changes (it typically get incremented by one). This seems to happen after an abnormal shutdown. After a normal shutdown and reboot the device id reverts back to what it was previously.
    / is on a local disk (not NFS or anything like that) and I'm talking about the device id you can obtain via the following command:
    stat / | cut -d' ' -f1
    Any idea why this is happening?

    boot up a (any) live CD, cp -a, generate a new grub.cfg/adjust menu.lst and don't forget to update your fstab - done.
    Just done it myself.

  • Problem in Reducing the root file system space

    Hi All ,
    The root file system is reached 86%. We have cleared 1 GB data in /var file system. But the root file system still showing 86%. Please note that the /var file is not seprate file system.
    I have furnished the df -h output for your reference. Please provide solution as soon as possible.
    /dev/dsk/c1t0d0s0 2.9G 2.4G 404M 86% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 30G 1.0M 30G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    /dev/dsk/c1t0d0s3 6.7G 3.7G 3.0G 56% /usr
    /platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1
    2.9G 2.4G 404M 86% /platform/sun4v/lib/libc_psr.so.1
    /platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
    2.9G 2.4G 404M 86% /platform/sun4v/lib/sparcv9/libc_psr.so.1
    fd 0K 0K 0K 0% /dev/fd
    swap 33G 3.5G 30G 11% /tmp
    swap 30G 48K 30G 1% /var/run
    /dev/dsk/c1t0d0s4 45G 30G 15G 67% /www
    /dev/dsk/c1t0d0s5 2.9G 1.1G 1.7G 39% /export/home
    Regards,
    R. Rajesh Kannan.

    I don't know if the root partition filling up was sudden, and thus due to the killing of an in-use file, or some other problem. However, I have noticed that VAST amounts of space is used up just through the normal patching process.
    After I installed Sol 10 11/06, my 12GB root partition was 48% full. Now, about 2 months later, after applying available patches, it is 53% full. That is about 600 MB being taken up by the superseded versions of the installed patches. This is ridiculous. I have patched using Sun Update Manager, which by default does not use the patchadd -d option that would not back up old patch versions, so the superseded patches are building up in /var, wasting massive amounts of space.
    Are Solaris users just supposed to put up with this, or is there some other way we should manage patches? It is time consuming and dangerous to manually clean up the old patch versions by using patchrm to delete all versions of a patch and then using patchadd to re-install only the latest revision.
    Thank you.

  • Changing the root file system device to another device.

    Hi all,
    I have my arch root file system on /dev/sda1  ext4 and /home on /dev/sda6 , I need to change root device to /dev/sda5. Can I do it just by copying / to
    /dev/sda6 and reinstalling grub? Please help me if anyone tried it.
    Thanks & Regards

    boot up a (any) live CD, cp -a, generate a new grub.cfg/adjust menu.lst and don't forget to update your fstab - done.
    Just done it myself.

  • [SOLVED] - Changing the root file system to a different disk

    Hi,
    I ran out of disk space on my / partition so I decided to buy a new hard drive, and copy everything over (but with different sized partitions). Hoewever, Arch is still using the old / partition rather than the new one.
    My new home partition is mounted on /home, as I expect. But for some reason, both the old and the new root partitions are mounted on /. Furthermore, I know that the old disk is being used for the root filesystem because conky tells my that it's 94% full, which is how full the old / on my old disk was.
    Here are the things I tried:
    First of all, I changed my fstab so that the root partition on my new disk gets mounted as /. (I also changed it for my /home partition similarly). Here are the relevant lines from my fstab:
    LABEL=new-hitachi-root / ext3 defaults 0 1
    LABEL=new-hitachi-home /home ext3 defaults 0 1
    UUID=3c1c1940-693f-4428-aa89-65e1403241f7 /old-home ext3 defaults 0 1
    UUID=4a84f8ae-4bad-4acf-8573-1a7b244b416c /old-root ext3 defaults 0 1
    After this, gparted reported that my old root partition was mounted under both / and /old-root. My new root partition is mounted under /, also. (So I have two partitions mounted under /, my old and new root partitions. However, the system is using the old root partition, since conky still tells my that / is 94% full).
    I'm not sure what else to try. I tried messing around with /boot/grub/menu.list, but I'm not sure how to modify it, I keep making my system unbootable. At the moment it looks like
    title Arch Linux
    root (hd0,0)
    kernel /vmlinuz26 root=/dev/disk/by-uuid/4a84f8ae-4bad-4acf-8573-1a7b244b416c ro
    initrd /kernel26.img
    (or it did look like that, before I modified it). That seems to be right, because the root entry says (hd0,0), which is the same as /dev/sda, which is the disk where my new root partition is.
    Cheers for any help! I'm pretty stuck until I can get some more space on my root partition.
    Last edited by ElKatrina (2011-11-08 02:06:54)

    karol, thanks. Any idea how to get it to point to my new disk? I tried
    root=/dev/disk/by-label/new-hitachi-root ro
    but I couldn't boot from that, I got loads of errors... it couldn't find proc, it didn't even know the host name, loads of other errors. What is the new naming scheme?
    bangkok_manouel, do you mean grub? I modified /boot/grub/menu.list as described above, is there anything else I should do?
    Edit: I didn't post the whole fstab file, but boot is definetly in there. Actually, I'm still booting from the old disk, since I didn't want to boot from the new one until I got root and home right. (Is this bad?)
    My whole fstab:
    devpts /dev/pts devpts defaults 0 0
    shm /dev/shm tmpfs nodev,nosuid 0 0
    LABEL=callisto /callisto ext3 defaults 0 1
    LABEL=thebe /thebe ext3 defaults 0 1
    LABEL=new-hitachi-boot /new-boot ext3 defaults 0 1
    LABEL=new-hitachi-root / ext3 defaults 0 1
    LABEL=new-hitachi-home /home ext3 defaults 0 1
    UUID=3c1c1940-693f-4428-aa89-65e1403241f7 /old-home ext3 defaults 0 1
    UUID=4795b52b-f849-4bcd-8032-d1634550afdc /boot ext2 defaults 0 1
    UUID=4a84f8ae-4bad-4acf-8573-1a7b244b416c /old-root ext3 defaults 0 1
    Last edited by ElKatrina (2011-11-07 07:52:34)

  • Ocfs2 can not mount the ocfs2 file system on RedHat AS v4 Update 1

    Hi there,
    I installed ocfs2-2.6.9-11.0.0.10.3.EL-1.0.4-1.i686.rpm onto RedHat linux AS v4 update 1. Installation looks OK. And configure ocfs2 (At this stage i only added 1 node in the cluster), load and start accordingly. Then paritition the disk and mkfs.ocfs2 the partition. Everything seems OK.
    [root@node1 init.d]# ./o2cb status
    Module "configfs": Loaded
    Filesystem "configfs": Mounted
    Module "ocfs2_nodemanager": Loaded
    Module "ocfs2_dlm": Loaded
    Module "ocfs2_dlmfs": Loaded
    Filesystem "ocfs2_dlmfs": Mounted
    Checking cluster ocfs2: Online
    Checking heartbeat: Not active
    But here you can check if the partition is there:
    [root@node1 init.d]# fsck.ocfs2 /dev/hda12
    Checking OCFS2 filesystem in /dev/hda12:
    label: oracle
    uuid: 27 74 a6 70 32 ad 4f 77 bf 55 8e 3a 87 78 ea cb
    number of blocks: 612464
    bytes per block: 4096
    number of clusters: 76558
    bytes per cluster: 32768
    max slots: 2
    /dev/hda12 is clean. It will be checked after 20 additional mounts.
    However, mount -t ocfs2 /dev/hda12 just does not work.
    [root@node1 oracle]# mount -t ocfs2 /dev/hda12 /oradata/m10g
    mount.ocfs2: No such device while mounting /dev/hda12 on /oradata/m10g
    [root@node1 oracle]# mount -L oracle
    mount: no such partition found
    Looks like mount just can not see the ocfs2 partition somehow.
    I cannot find much info in metalink and anywhere else, does anyone here come across this issue before?
    Regards,
    Eric

    I have been having a similar problem.
    However, when I applied your fix I ended up with another problem:
    (20765,0):ocfs2_initialize_osb:1179 max_slots for this device: 4
    (20765,0):ocfs2_fill_local_node_info:851 I am node 0
    (20765,0):dlm_request_join:756 ERROR: status = -107
    (20765,0):dlm_try_to_join_domain:906 ERROR: status = -107
    (20765,0):dlm_join_domain:1151 ERROR: status = -107
    (20765,0):dlm_register_domain:1330 ERROR: status = -107
    (20765,0):ocfs2_dlm_init:1771 ERROR: status = -12
    (20765,0):ocfs2_mount_volume:912 ERROR: status = -12
    ocfs2: Unmounting device (253,7) on (node 0)
    Now the odd thing about this bit of log output (/var/log/messages)
    is the fact that this is only a 2 node cluster and only one node has
    currently mounted the file system in question. Now, I am running
    the multipath drivers with my qla2xxx drivers under SLES9-R2.
    However, at worst that should only double everything
    (2 nodes x 2 paths through the SAN).
    How can I get more low level information on what is consuming
    the node slots in ocfs2? How can I force it to "disconnect" nodes
    and recover/cleanup node slots?

  • Sharing the root file system with file server in windows embedded compact 7

    Seems it is not practical. I actually see the share, and the top level files and folders. But I have no access right for the files.
    And usb disk's mount point are not listed too. Is there any solution?

    I don't recall this problem. How was the share created? Programmatically by your code? What access list did you set? Did you create NTLM users and are you connected from the remote client as one of those users?
    I believe that you may have to create a separate share for alternate device mount points under the root (disks, etc.) but I think the basic operation you want should be possible.
    Paul T.

  • [SOLVED] Can't mount my root file system on boot!

    Posting from an Ubuntu install on the same machine.
    So, my root partition, labeled "arch", is ext4 on /dev/sda5. My home partition is btrfs on /dev/sda1.
    When I boot, I get this error:
    http://imgur.com/mzmLIZH
    Not sure what to do from there. I can mount everything and chroot into arch from my ubuntu installation, so I think the FS is ok.
    [edit]
    here is the fstab:
    tmpfs tmp tmpfs nodev,nosuid 0 0
    LABEL=arch / ext4 rw,relatime,discard,noatime 0 1
    LABEL=home /home btrfs rw,relatime,discard,noatime 0 2
    Last edited by ninjaaron (2014-10-29 18:32:12)

    bootloader is grub2. Here is /boot/grub/grub.cfg:
    # DO NOT EDIT THIS FILE
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    insmod part_gpt
    insmod part_msdos
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
    else
    set default="0"
    fi
    if [ x"${feature_menuentry_id}" = xy ]; then
    menuentry_id_option="--id"
    else
    menuentry_id_option=""
    fi
    export menuentry_id_option
    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    function load_video {
    if [ x$feature_all_video_module = xy ]; then
    insmod all_video
    else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    fi
    if [ x$feature_default_font_path = xy ] ; then
    font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    else
    search --no-floppy --fs-uuid --set=root ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    fi
    font="/usr/share/grub/unicode.pf2"
    fi
    if loadfont $font ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    set locale_dir=$prefix/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_input console
    terminal_output gfxterm
    if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
    set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    else
    search --no-floppy --fs-uuid --set=root ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4 rw quiet i915.modeset=1 acpi_backlight=vendor
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux.img
    submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4' {
    menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    else
    search --no-floppy --fs-uuid --set=root ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4 rw quiet i915.modeset=1 acpi_backlight=vendor
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux.img
    menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    else
    search --no-floppy --fs-uuid --set=root ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=ecfcae91-5f9e-4e23-be7d-9381f4a0fbb4 rw quiet i915.modeset=1 acpi_backlight=vendor
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-fallback.img
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Ubuntu Utopic Unicorn (development branch) (14.10) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-8432f995-66bc-42f8-b240-02adeef5f9af' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 8432f995-66bc-42f8-b240-02adeef5f9af
    else
    search --no-floppy --fs-uuid --set=root 8432f995-66bc-42f8-b240-02adeef5f9af
    fi
    linux /boot/vmlinuz-3.16.0-9-generic root=UUID=8432f995-66bc-42f8-b240-02adeef5f9af ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.16.0-9-generic
    submenu 'Advanced options for Ubuntu Utopic Unicorn (development branch) (14.10) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-8432f995-66bc-42f8-b240-02adeef5f9af' {
    menuentry 'Ubuntu (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-9-generic--8432f995-66bc-42f8-b240-02adeef5f9af' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 8432f995-66bc-42f8-b240-02adeef5f9af
    else
    search --no-floppy --fs-uuid --set=root 8432f995-66bc-42f8-b240-02adeef5f9af
    fi
    linux /boot/vmlinuz-3.16.0-9-generic root=UUID=8432f995-66bc-42f8-b240-02adeef5f9af ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.16.0-9-generic
    menuentry 'Ubuntu, with Linux 3.16.0-9-generic (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-9-generic--8432f995-66bc-42f8-b240-02adeef5f9af' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 8432f995-66bc-42f8-b240-02adeef5f9af
    else
    search --no-floppy --fs-uuid --set=root 8432f995-66bc-42f8-b240-02adeef5f9af
    fi
    linux /boot/vmlinuz-3.16.0-9-generic root=UUID=8432f995-66bc-42f8-b240-02adeef5f9af ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.16.0-9-generic
    menuentry 'Ubuntu, with Linux 3.16.0-9-generic (recovery mode) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-9-generic--8432f995-66bc-42f8-b240-02adeef5f9af' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 8432f995-66bc-42f8-b240-02adeef5f9af
    else
    search --no-floppy --fs-uuid --set=root 8432f995-66bc-42f8-b240-02adeef5f9af
    fi
    linux /boot/vmlinuz-3.16.0-9-generic root=UUID=8432f995-66bc-42f8-b240-02adeef5f9af ro recovery nomodeset
    initrd /boot/initrd.img-3.16.0-9-generic
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # 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.
    ### END /etc/grub.d/40_custom ###
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    ### BEGIN /etc/grub.d/60_memtest86+ ###
    ### END /etc/grub.d/60_memtest86+ ###
    here is my /etc/mkinitcpio.conf
    MODULES="btrfs"
    BINARIES=""
    FILES=""
    HOOKS="base udev autodetect modconf block filesystems keyboard fsck btrfs_advanced"
    I'll get back with you on the `cat /proc/cmdline` in a moment...
    Last edited by ninjaaron (2014-10-29 05:11:56)

  • SOLVED: kernel loads, but doesn't have a root file system

    Hi,
    The system is an Asus X202E. It does UEFI and has a GPT partition system. I've gotten through that part. And it is clear to me that the kernel loads.
    It's the next step that's giving me grief. I've tried this with two bootloaders: gummiboot and rEFInd.
    With gummiboot, the kernel panics because it can't mount the root file system. With rEFInd, it gets to the intial ramdisk and then drops me to a shell, apparently because the root file system is set to null, and it obviously can't mount that as "real root".
    Here is what I posted on the Arch mailing list, documenting that I have indeed specified the correct root (I'm copying this from the email, eliding the unfortunate line wraps):
    bridge-live# cat /boot/loader/entries/arch.conf
    Title Arch Linux
    linux /vmlinuz-linux
    initrc /initramfs-linux.img
    options root=PARTUUID=d5bb2ad1-9e7d-4c75-b9b6-04865dd77782
    bridge-live# ls -l /dev/disk/by-partuuid
    total 0
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 0ab4d458-cd09-4bfb-a447-5f5fa66332e2 -> ../../sda6
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 3e12caeb-1424-451c-898e-a4ff05eab48d -> ../../sda7
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 432a977b-f26d-4e75-b9ee-bf610ee6f4a4 -> ../../sda3
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 95a1d2c2-393a-4150-bbd2-d8e7179e7f8a -> ../../sda2
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 a4b797d9-0868-4bd1-a92d-f244639039f5 -> ../../sda4
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 d5bb2ad1-9e7d-4c75-b9b6-04865dd77782 -> ../../sda8
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 ed04135b-bd79-4c7c-b3b5-b0f9c2fe6826 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 f64f82a7-8f2b-4748-88b1-7b0c61e71c70 -> ../../sda5
    The root partition is supposed to be /dev/sda8, that is:
    lrwxrwxrwx 1 root root 10 Apr 15 19:26 d5bb2ad1-9e7d-4c75-b9b6-04865dd77782 -> ../../sda8
    So the correct PARTUUID followed by the one I have specified in
    arch.conf is:
    d5bb2ad1-9e7d-4c75-b9b6-04865dd77782
    d5bb2ad1-9e7d-4c75-b9b6-04865dd77782
    I'm guessing that this is really the same problem with both gummiboot and with rEFInd, but don't really know. It's clear to me that the initrd is not being correctly constructed. So I removed /etc/mkinitcpio.conf and did, as per the Arch wiki,
    pacman -Syyu mkinitcpio linux udev
    No joy.
    I don't even know which way to go at this point. If I even knew how to tell it where the real disk is in the initial ram disk shell, that would help. Better of course, would be actually solving the problem.
    Thanks!
    Last edited by n4rky (2013-04-17 21:41:36)

    I have made extremely limited progress on this issue.
    My previous attempt to specify the root partition in mkinitcpio.conf was insufficient. Furthermore, this is no place--despite the documentation--for the orthodoxy about using UUIDs rather than the straight /dev/sdx. In my case:
    root=/dev/sda8
    and run
    mkinitcpio -p linux
    It still drops me into the shell at boot. I can do
    mount /dev/sda8 /new_root/
    and exit the shell. It still won't believe it has the root device and drops me back in. I just exit.
    At this point, for a very brief moment, things look promising. It appears to be starting normally. Then, gdm.service, NetworkManager.service, and dbus.service all fail to start. There may be others but the screen goes by too quickly. At this point, it hangs trying to initialize the pacman keyring and all I can do is CTRL-ALT-DEL.
    It occurred to me that this might extend to the rEFInd configuration and so I modified it to also use /dev/sda8 rather than the UUID, but this made no difference. Trying to boot via gummiboot still yields the previously specified kernel panic.

  • [SOLVED]Root file system changed

    I'm currently using ArchLinux
    I'm not sure what went wrong, but now when I login as root and "cd" I don't see the root file system. Instead i see
        [root@aspect ~]# ls -al
    total 36
    drwxr-x---  7 root root 4096 Apr 13 16:29 .
    drwxr-xr-x 17 root root 4096 Apr 13 08:18 ..
    -rw-------  1 root root 2849 Apr 13 16:27 .bash_history
    drwxr-xr-x  2 root root 4096 Apr 13 10:35 .config
    drwx------  3 root root 4096 Apr 13 10:34 .dbus
    -rw-------  1 root root   49 Apr 13 10:35 .directory
    drwxr-xr-x  3 root root 4096 Apr 13 10:34 .kde4
    drwxr-xr-x  3 root root 4096 Apr 13 10:35 .local
    drwx------  3 root root 4096 Apr 13 16:29 .nv
    If I cd to ".." I can see the root file system from there.
    Also When I drag files into terminal, it can't locate them. I Used a java folder I had in downlaods as an example. But it's like this everywhere.
    [aspect@aspect ~]$ file:///home/aspect/Downloads/jre bash: file:///home/aspect/Downloads/jre: No such file or directory
    Last edited by aspectratio (2015-04-13 22:05:33)

    ewaller wrote:
    aspectratio wrote:I've already done all of this. What makes you think I was running KDE as root?
    drwxr-xr-x 3 root root 4096 Apr 13 10:34 .kde4
    Sometime today a hidden directory containing kde files was created in the /root being owned by root.  That's how
    So the problem here is I came from debian. And aparently there when you cd as root, it will bring you to the atual file system.
    Fair enough.
    I was told to edit /etc/passwd and change the root dir to just / from /bin/bash
    Now I can no longer login as root. I will try to boot recue mode and chroot into the system to fix the file.
    That would be the way to fix it.  You may not need to actually chroot, just mount the root partition at /mnt and edit /mnt/etc/passwd.
    As to not running desktop environments as root -- it is a pet peeve of mine.  I am not saying this about you, you understand the issue;  but I have had arguments with people in the past about not running GUI DEs as root, and them insisting on it being their machines and they can do what they want.  They are absolutely correct.  But they can also fend for themselves.
    Edit:  If you do have another user in wheel, and if wheel can gain root privileges, just log in as that user and use sudo to fix it.
    Yeah it's a security risk.
    I've fixed the file. But I'm just not sure why I can't drag and drop paths anymore. It apears as though it's not a common thing anyways.

  • Change ZFS root dataset name for root file system

    Hi all
    A quick one.
    I accepted the default ZFS root dataset name for the root file system during Solaris 10 installation.
    Can I change it to another name afterward without reinstalling the OS? For example,
    zfs rename rpool/ROOT/s10s_u6wos_07b rpool/ROOT/`hostname`
    zfs rename rpool/ROOT/s10s_u6wos_07b/var rpool/ROOT/`hostname`/var
    Thank you.

    Renaming the root pool is not recommended.

  • Restoring root file system from netbackup

    Recently one of the hard disk containing root file system in my T2000 got many hard errors suddenly but the system continued to run. I dont have os mirroring. So I took backup of the root file system using veritas netbackup & restored those in the second hard disk. Also installed boot block for the same. I tried booting from the second hard disk & it booted, came to the prompt. But i found that most of the commands are not working. I tried df -h & it gave me error message like "unable to open /etc/mnttab". Is this approach incorrect?
    My guess is that it doesnt work as i dint set partition table same for both the disks.

    You need to use the baremetal backup/restore options with Netbackup to make backups of your operating system. It's generally recommended that you make a backup of your OS in single user mode, or booted from alternate media, so that you don't make backups of open files.
    Another backup method would be to use something like ufsdump for ufs filesystems, or ZFS send/receive
    and when you do restore, first boot in single user mode from cd so that you can update the files that still point to the old disk location, like the /etc/vfstab (for ufs) and to update the device paths with a reconfiguration reboot.
    Edited by: 3sth3r on Jan 25, 2012 1:04 AM

  • How to add more disk space into /   root file system

    Hi All,
    Linux  2.6.18-128
    can anyone please let us know how to add more disk space into "/" root file system.
    i have added new hard disk with space of 20GB, 
    [root@rac2 shm]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda1             965M  767M  149M  84% /
    /dev/hda7             1.9G  234M  1.6G  13% /var
    /dev/hda6             2.9G   69M  2.7G   3% /tmp
    /dev/hda3             7.6G  4.2G  3.0G  59% /usr
    /dev/hda2              18G   12G  4.8G  71% /u01
    LABLE=/               2.0G     0  2.0G   0% /dev/shm
    /dev/hdb2             8.9G  149M  8.3G   2% /vm
    [root@rac2 shm]#

    Dude! wrote:
    I would actually question whether or not more disks increase the risk of a disk failure. One disk can break as likely as one of two of more disks.
    Simple stats.  Buying 2 lottery tickets instead of one, gives you 2 chances to win the lottery prize. Not 1. Even though the odds of winning per ticket remains unchanged.
    2 disks buy you 2 tickets in The-Drive-Failure lottery.
    Back in the 90's, BT (British Telecom) had a 80+ node OPS cluster build with Pyramid MPP hardware. They had a dedicated store of scsi disks for replacing failed disks - as there were disk failure fairly often due to the number of disks. (a Pryamid MPP chassis looked like a Xmas tree with all the scsi drive LEDs, and BT had several)
    In my experience - one should rather expect a drive failure sooner, than later. And have some kind of contingency plan in place to recover from the failure.
    The use of symbolic links instead of striping the filesystem protects from the complete loss of the enchilada if a volume member fails, but it does not reduce the risk of loosing data.
    I would rather buy a single ticket for the drive failure lottery for a root drive, than 2 tickets in this case. And using symbolic links to "offload" non-critical files to the 2nd drive means that its lottery ticket prize is not a non-bootable server due to a toasted root drive.

  • Solaris 10:unable to mount a solaris root file system

    Hi All,
    I am trying to install Solaris 10 X86 on a Proliant DL385 Server it has a Smart array 6i, I have download the driver from the HP web site, on booting up the installation CD 1, adding the device driver, it sees the device but now says it can���t mount the device. Any clues what I need to do?
    Screen Output:
    Unable to mount a Solaris root file system from the device
    DISK: Target 0, Bios primary drive - device 0x80
    on Smart Array 6i Controller on Board PCI bus 2, at Dev 4
    Error message from mount::
    /pci&#64;0,0/pci1022,7450&#64;7/pcie11,4091&#64;4/cmdk&#64;0,0:a: can't open - no vtoc
    any assistence would be appreciated.

    Hi,
    I read the Message 591 (Agu 2003) and the problem is quite the same. A brief description: I have aLaptop ASUS with HDD1 60GB and a USB storage HDD (in next HDD2) 100GB. I installed Solaris 10 x86 on HDD2 (partition c2t0d0s0). At the end of installation I removed the DVD and using BIOS features I switched the boot to HDD2. All ok; I received the SUN Blue Screen and I choose the active Solaris option; but at the beginning of the boot I received the following error message
    Screen Output:
    Unable to mount a Solaris root file system from the device
    DISK: Target 0: IC25N060 ATMR04-0 on Board ....
    Error message from mount::
    /pci&#64;0,0/pci-ide2,5/ide&#64;1/cmdk&#64;0,0:a: can't open
    any assistence would be appreciated.
    Regards

Maybe you are looking for

  • Flex Builder Projects

    Flex Builder does not have an "Open Project" choice on the menu. We'd like to check the flex project into our source code control and share the environment, however we cannot find a way to "open" the project on a machine other than the one it was cre

  • Error messages during booting of Solaris 8 zone

    I have installed a Solaris 8 zone from a flash archive of a Solaris 8 server that is currently in production. I get no errors during the installation of the zone and when I boot the zone I get the following messages on the zone console: SunOS Release

  • Selecting Objects [Wire Frames]

    Hello.  When I select and object on the timeline, I understand that you have to double click it on your canvas to actually enable the wireframes and move it around.  Is there anyway that when I click something on the timeline it automaticly selects i

  • MD5 Original Value

    Dear Sirs I have inserted the following query (IN ORDER TO ENCRYPT THE NAME VALUE) to a Table using MySQL. INSERT INTO LANGUAGES (NAME, DOMAIN) VALUES ( MD5('Java'), 'jv'); When I perform the query SELECT `NAME` FROM `encryption` WHERE `DOMAIN` = 'jv

  • Sales Probabaility

    Hi All, where we are going to assign the Sales probability ( which appears in the sales document). let me make clear..when we go T.code:V0V8 and look into details of Sales order document "OR" , we find the probabality field assigned as 100% . My ques