I have installed a Debian. I rsynced it. I load it on my client through PXE from NFS to make a backup. But I need my Computer(NFS-host) at the same time to make something other with it. For example, sometimes I like to use my Computer(host) in other room, so I do not like to leave it there.

When I disconnect it from NFS, the system freezes. The idea came across my mind that I will remount the root filesystem from USB and than will I disconnect from the server. I was thinking, I will use a USB stick, with same immutable (/bin) files, and I will load all mutable devices/files (/proc, /var) in memory.
What do you recommend?

proc            /proc           ramfs   nodev,noexec.nosuid     0       0  
none            /tmp            ramfs   defaults        0       0  
none            /var/run        ramfs   defaults        0       0  
none            /var/lock       ramfs   defaults        0       0  
none            /var/tmp        ramfs   defaults        0       0  
none            /var/log        ramfs   defaults        0       0  
/dev/nfs        /               nfs     defaults        1       1  

I changed the last line to:

/dev/sda1        /               ext4    errors=remount-ro         0       0  
mount -o -remount /  
/dev/sda1 on / type ext4 (ro,errors=remount-ro)  
[  220.880314] EXT4-fs (sda1): mounted filesystem with ordered data mode  

But the system is still hanging.If I pull back the cable then it's all right.

  • I do not understand your question. What is a “PXE Linux”? What is stored on that machine? What are you disconnected from what? What do you mean by “mutable devices” and what does it mean to load them in memory? – Gilles Oct 15 '13 at 21:50
  • I have installed a Debian.I load it througfh PXE from NFS to save the client files with dd. When I disconnect from NFS, the system is frosen.I thought I will remount the root fs from USB and than will I disconnect from the server. – Szepes Oct 15 '13 at 22:56
  • 1
    You can change the root filesystem with pivot_root. This is typically used to change the root filesystem from an initramfs to the actual root device during boot. – Thomas Nyman Oct 16 '13 at 19:08
  • 1
    Thank you. I readed something about it, but I like to change it after boot. I will make another system with another NFS to try out, what will happening when I change the rootfs(or use various rootfs - nfs-kernel-server restart command not froze it). – Szepes Oct 16 '13 at 19:29
  • 1
    Or the newer switch_root but it is also for boot only. The problem is that probably once jumped into the new rootfs (chroot?) you've to kill all the process launched from the old one (init included). – Alex Oct 16 '13 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.