You are not logged in.

#1 2005-08-11 05:50:55

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

remounting all mountable partitions read-only: how?

In order to do a reiserfsck, I need to remount the partitions to be checked read-only... But I seem to be unable to do this. I can remount the /home partition just fine, but remounting the root partition doesn't work so well - in order to do so, I must unmount /proc, and attempting to do so gets me the message that /proc cannot be unmounted because it is busy. So, how do I get /proc properly unmounted so that I can remount my root partition?

Offline

#2 2005-08-11 09:01:17

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: remounting all mountable partitions read-only: how?

Hm, remounting it writable works with

mount -n -o remount,rw blabla blabla

Try

mount -n -o remount,ro blabla blabla


(Just a suggestion smile)


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2005-08-11 09:38:23

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,017

Re: remounting all mountable partitions read-only: how?

The easiest way would be to take advantage of magic sysrq. Mere alt+sysrq+u key combination (preceded by alt+sysrq+s to sync the data to disk) would remount all mounted filesystems read-only. Magic sysrq seems to be enabled in stock arch's kernel, however it is disabled in default /etc/sysctl.conf.

Don't know how easily achievable is it with mere mount commands.

Online

#4 2005-08-11 19:20:45

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: remounting all mountable partitions read-only: how?

FUBAR: tried that, didn't work - the filesystem was busy... that's why I figured I had to do some other monkeying around.

Lucke: thanks, I'll try that...

Offline

#5 2005-08-11 19:41:57

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 460

Re: remounting all mountable partitions read-only: how?

have you considered using  Knoppix live-CD

then you can explicitly mount read only, all partitions. similar syntax to Fubars post. mount -o ro ../../../dev/hdXY /mnt/hdXY
where X is your drive and Y your partition number.

Offline

#6 2005-08-13 03:19:47

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: remounting all mountable partitions read-only: how?

I have Damn Small Linux, but it doesn't come with reiserfsck. There is a way to get reiserfsck on it, but since DSL doesn't use UnionFS (and couldn't because I don't have a CD burner) I have to install reiserfsprogs every time I boot into DSL for a reiserfsck.

At any rate, I'd prefer to keep reboots to a minimum...

Edit: thanks for the instructions, Lucke, but that doesn't do a danged thing on my system... :?

Offline

#7 2005-08-13 04:58:53

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,017

Re: remounting all mountable partitions read-only: how?

Bah, it ought to work. Remember to enable it, if it's disabled in sysctl.conf (sysctl -w kernel.sysrq=1). Problem is bigger if you don't have it enabled in the kernel ;-) (grep -i sysrq /boot/your_kconfig). Anyway, to confirm that it works log to any console on vc 1-6 and execute any of the key combinations (sysrq key is also known as print screen). You should get some message printed on the screen.

Online

#8 2005-08-13 10:08:52

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 460

Re: remounting all mountable partitions read-only: how?

I have Damn Small Linux, but it doesn't come with reiserfsck

i believe knoppix does.

Offline

#9 2005-08-15 13:32:42

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: remounting all mountable partitions read-only: how?

Gullible Jones, have you considered editing your /etc/fstab so your partitions are fsck'ed at boot time? See this thread.

The Knoppix CD has fsck for "every" FS, btw.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#10 2005-08-15 20:43:42

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: remounting all mountable partitions read-only: how?

Just interested, why do you need to do reiserfsck? I have used a reiserfs since about 2001 and unlike ext3, have never had the need. I even used to demo how good it was by unplugging the HD in my old Toshiba.


--(*(cs25x--));

Offline

#11 2005-08-15 22:45:49

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: remounting all mountable partitions read-only: how?

I've used both Archie and the RIP repair-cd for moving, resizing and checking partitions. The RIP cd contains a recent kernel and even works for reiser4.

Offline

Board footer

Powered by FluxBB