How to umount "/" file system
Hi,
I want to umount root partition. below is the o/p for df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 12G 3.2G 7.8G 30% / tmpfs 506M 0 506M 0% /dev/shm If i give #umount /dev/sda1 im getting the below error.i can't unmount the file system umount: /: device is busy umount: /: device is busy thanks, |
You obviously can't unmount a partition that's in use. What do you want to do to that partition? You could just get a live CD and do whatever it is on the unmounted partition.
|
I want to run fsck command.so i need to unmount the filesystem.
|
You can't use a live CD for this because..?
|
karthick,
You get that error because u are executing that command from within root partition. You cannot do that. Why would you want to unmount '/' (root) partition?! If you want to edit/troubleshoot something on your linux partition, use livecd. (When I started typing it was a zero-reply thread. By the time I hit enter, I'm the 5th. :-P ) fsck is done automatically after certain mounts during boot. But if you want to force fsck you can try (as root user), Code:
shutdown -rF now |
@saivnoba
correct me if am wrong.. How do i check my file system ? To use fsck first i need to umount the file system right ? |
Greetings,
And also i'm going to change the filesystem from ext2 to ext3. for this i need to unmount the partiton.Without unmounting i can't do it. |
Again, why can't you use a live CD to do this?
|
bkarthic,
first close all the running programs, and then execute umount /dev/sda1. Make sure you have a backup of data and also that you selected the correct partition. Kind Regards. |
Greetings,
All our servers are in Sweeden.And am in India.I can't use Live Cd or shutdown -rF now.Its all production servers.If it goes down,then i will get trashed. Without live cd tell me how to check the filesystem. |
Your only option is the mentioned reboot command.
Also, if it is a production server I would recommend not to change the filesystem, unless there is a real good reason for that. |
someone please tell me what is a production server ?
|
Quote:
|
On boot you could :
put in an exit into /etc/rc.d/rc.sysinit to drop out into a shell ro mount -o remount,ro / for a fsck -n /dev/sda1 boot with the kernel parameters " S init=bin/bash " On a running system : Create a or several ramdisks with Code:
mkfs.ext2 /dev/ram[0-9] use something like Code:
mkdir /mnt/ram0 For a first better understanding try dl puppylinux 5series , which comes with a /sbin/init shellscript that contains this code . |
Could this work?
Code:
mount / -o remount,ro |
All times are GMT -5. The time now is 12:15 AM. |