Tonight I decided I wanted to tweak the configuration of my Debian install on my netbook (Ideapad S10-2) to work better with the SSD I put in it.

I have done this before and never had any issues but just in case I double-checked what I was doing against the Debian SSD Optimization guide and everything seemed right.

At this point I rebooted and things went wrong. The system refused to mount the volume as anything but read-only complaining about the "discard" flag not being recognized.

I've tried booting from several different live CDs (well, over PXE anyway) but they all refuse to mount the volume for one reason or another (after running through modprobe dm-mod; cryptsetup luksOpen et al) and I suspect it's the wrong way to go.

Well, the problem I'd rather solve is to figure out a way to make the crippled system (which boots with the root partition mounted read-only) mount the root partition rw by somehow ignoring the discardflag in /etc/fstab, /etc/lvm/lvm.conf and /etc/crypttab so that I can change those back, reboot and have things back the way they were.

Edit: It just dawned on me why it didn't work, the filesystem for the root partition is ext3 for some reason. I had naively assumed it would be ext4. So the solution is clearly to somehow mount while ignoring the discard flag.


Get to a shell ( boot into rescue / single user mode if needed ) and just mount -o remount,rw /.

Or if you are booting from a rescue cd, then it knows nothing about /etc/fstab, so just don't specify the -o discard when mounting.

  • I've tried both options (the latter from several different live CDs), trying the remount route results in mount complaining about the discard flag. The second option has given me two error messages at the final stages (past cryptsetup), in both cases claiming the filesystem type is unknown (lvm2pv and LVM2_member being the filesystems it claims to find). Although I suppose this could be one of those cases of the live-CD kernel/somelib/some util/whatever being another version than the one used to create the volume... – mludd Jul 19 '12 at 9:55
  • @mludd, if you are using LVM then you will need to activate that and then mount the logical volume, rather than the physical drive. Also try adding nodiscard to the remount options. – psusi Jul 19 '12 at 13:23
  • Tried again with an Ubuntu live CD and it mounted the volume happily. No clue what was wrong with the Debian Live CDs I tried beforehand. – mludd Jul 21 '12 at 15:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.