LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2003, 10:11 PM   #1
andrewb758
Member
 
Registered: Jan 2003
Location: Columbus, OH USA
Distribution: Debian unstable
Posts: 63

Rep: Reputation: 15
mounting root fs read-only


I want to use partimage to make an image of my Linux system. I have a few unique things about my system and setup that makes mounting my root fs readonly a bit hard:

1. I am saving the image to a NFS mount. I transfer the image to another computer and burn the DVD there.
2. The obvious choice for mounting the root fs readonly is a boot disk or cd like knoppix. Problem is, this is a laptop and it has a USB floppy and cd-rom. Most available boot disks (all that I've seen) won't work.
3. My ethernet NIC uses a 3rd-party kernel module. This is not a problem running Mandrake 9.1 because they include it in the 3rd-party section of their customized kernel, but it can be a problem here. It is a Broadcom 5700 series using the bcm5700 module (I think it's on Broadcom's web site)
4. simply passing the "ro" option to the kernel will not work because mandrake, in its startup process, mounts the root fs read only, runs e2fsck, and remounts in read-write mode, "ro" option or not.

I am posting this in hopes that someone knows of a good (preferably easy) way to mount a linux root fs read-only. I am at wits' end here so any help is much appreciated. Thank you.
 
Old 10-08-2003, 10:48 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,472

Rep: Reputation: 189Reputation: 189
I think partimage requires that the partition your backing up not be mounted. It is therefore impossible to back up root after you've booted. Did you try burning the partimage iso(it's on their website) and seeing if you can boot off that? Remarkably, it works on my sony vaio which has a pcmcia connected cd drive and very little else will boot off it. Might be worth a try.
If you have room on the drive, you might try putting a second minimal linux distro on there, install partimage on that and use it for backups of the main system. You can even configure in your network support in there so you can backup to you rnetwork drive. You can certainly do a minimal mandrake install in under 2 GB, probably under 1 GB. If you've got an old 2 or 3 GB drive laying around(who doesn't) you can slave it in the same box and do the install there and set up your boot loader to dual boot both linux distros.That's basically what I do. It speeds up the backups and can be used for trouble shooting the main system if the file system get's corrupted. I use it mainly for maintainance tasks and it comes in very handy.
 
Old 10-09-2003, 09:40 AM   #3
andrewb758
Member
 
Registered: Jan 2003
Location: Columbus, OH USA
Distribution: Debian unstable
Posts: 63

Original Poster
Rep: Reputation: 15
partimage iso

If you're talking about the system rescue cd then I have already tried it. Knoppix won't work either, although I found modification instructions for USB/firewire cd-roms. The cloop driver kept segfaulting, but I'm getting off topic here...

About the only thing that will boot from this USB CD-ROM drive is the Mandrake install CD. I tried hacking that to mount my fs read-only, but now that you say it has to not be mounted then I guess that's out the window. I'm guessing I'm going to have to burn a custom boot CD, I was kinda hoping that someone knew of an easier way...
 
Old 10-09-2003, 10:04 AM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,472

Rep: Reputation: 189Reputation: 189
Installing a second minimal linux is probably easier than trying to make a custom bootable cd. By the way, how did you get the mandrake install cd to boot?
 
Old 10-09-2003, 01:15 PM   #5
andrewb758
Member
 
Registered: Jan 2003
Location: Columbus, OH USA
Distribution: Debian unstable
Posts: 63

Original Poster
Rep: Reputation: 15
this probably isn't what you want to hear, but I didn't 'do' anything, per se. When I decided to install Mandrake on this laptop (I already have a Linux desktop), I put the disc in, booted it up, selected "CD-ROM Drive" from the one-time boot menu, and crossed my fingers. I really didn't expect it to work, but it says "Detecting USB devices" before loading the CD (that progress bar thingie in the console, before the GUI loads).

There are many different variables that go into whether you can boot from USB (PCMCIA, and so on) or not. Your BIOS is one, and the setup of the disc is another. Mandrake probably works because it loads USB Mass Storage (usb-storage.o) before it needs to access the actual CD-ROM filesystem. Up until then it is working off of the floppy boot image. Although I'm not sure that's right because I think Mandrake uses ISOLINUX, which doesn't use floppy images. Anyway, back on topic...

The problem with a small linux install is that I only have a 30GB hard disk and this computer has windows on it as well. So things could get a bit tight if I keep adding on. The Linux Diskless Node HOWTO (at tldp.org) provides a pretty good starting point for creating a live Linux CDROM from (just about) any distro.
 
Old 10-09-2003, 01:21 PM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
you can remount the / partition read only by

mount -o ro -o remount /

Though I'm not sure it's a good idea to do on a running system if you have things like /tmp and /var in that partition.
 
Old 10-09-2003, 01:32 PM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,472

Rep: Reputation: 189Reputation: 189
Damn Small Linux installs on 50MB:

http://www.damnsmalllinux.org/

Can probably use your existing swap partiton and can install partimage on it.

Or you can take a look at zipslack which can be intalled on an existing FAT or FAT32 windows partition by just unzipping it to a directory. Takes about 100MB.

http://www.slackware.com/zipslack/

Last edited by kilgoretrout; 10-09-2003 at 02:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting a drive read only youngstorm Linux - Hardware 3 09-26-2005 11:53 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 09:32 AM
Mounting / as read only shishimo Linux - General 9 06-23-2004 02:24 AM
kernel panic unable to mount root (yes ive read/read other posts) dmx9595 Linux - General 4 01-17-2004 06:07 AM
Mounting root filesystem in read only mode. Ocran Linux - Software 3 07-01-2002 01:38 AM


All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration