[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using ddrescue on the root partition - boot with / as read-only



On 2023-09-13 23:00:27 -0400, Stefan Monnier wrote:
> > Or perhaps I could use /bin/sh as init, so that systemd (and its
> > remount as rw) would be avoided?
> 
> Indeed booting with `init=/bin/bash` can be a handy option I've used in
> the past: you get into the normal root (so you don't have to figure out
> how to find and mount root from the initramfs), mounted read-only.

I've used init=/bin/sh, but bash (or zsh) would have been more
practical (as dash doesn't have completions).

Two other things are needed:
  * The USB drive must be connected before booting so that the device
    is recognized (otherwise lsblk doesn't list it).
  * At some point, I got too many kernel messages in the console, and
    I couldn't stop them (I thought that they were due to disk errors
    because of ddrescue, but Ctrl-C had no effect). The solution
    I found on the web was to set kernel.printk to 3 3 3 3. I did
    that with:
      sysctl kernel.printk="3 3 3 3"
    Then I resumed ddrescue. Still onging...

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: