V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
edis0n0
V2EX  ›  Linux

Ubuntu 有办法在 root 被挂载前进入 Shell 吗?

  •  
  •   edis0n0 · Aug 29, 2022 · 2527 views
    This topic created in 1340 days ago, the information mentioned may be changed or developed.
    需求是 shrink lvm 中的系统盘,可以用 VNC 但是不能挂载自定义 ISO 。试了下不管 resuce 还是 emergency mode root 分区都被挂载了,无法操作,折腾了一晚上。
    ysc3839
        1
    ysc3839  
       Aug 29, 2022 via Android   ❤️ 3
    内核参数加上 break
    https://manpages.ubuntu.com/manpages/xenial/man8/initramfs-tools.8.html#kernel%20command%20line
    注意这是 initramfs 提供的功能,不是 Linux 内核的功能。
    ruidoBlanco
        2
    ruidoBlanco  
       Aug 29, 2022   ❤️ 1
    补充下,initramfs 里面跑 lvm 的命令,需要加上「 lvm 」前缀,比如 pvdisplay 要写成「 lvm pvdisplay 」。
    edis0n0
        3
    edis0n0  
    OP
       Aug 29, 2022   ❤️ 1
    @ysc3839
    @ruidoBlanco 成功了,感谢,顺便补充下 initramfs 下没有 resize2fs 和 e2fsck 等命令,提前 cp 出来或者现场 mount 进去 cp 再 umount 都可以
    lingkep
        4
    lingkep  
       May 21, 2024
    碰到了类似的场景,感谢万能的 v 友
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   940 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 20:16 · PVG 04:16 · LAX 13:16 · JFK 16:16
    ♥ Do have faith in what you're doing.