LINUX.ORG.RU

История изменений

Исправление kostik87, (текущая версия) :

А switch_root как раз делает то, что тебе нужно, man switch_root:

SWITCH_ROOT(8)                                                                                           System Administration                                                                                           SWITCH_ROOT(8)

NAME
       switch_root - switch to another filesystem as the root of the mount tree

SYNOPSIS
       switch_root [-hV]

       switch_root newroot init [arg...]

DESCRIPTION
       switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process.
WARNING: switch_root removes recursively all files and directories on the current root filesystem.

Хотя да, значит пробуй move.

Возможно, придётся делать ленивое размонтирование umotun -l /old_root.

Зачем тебе такой велосипед?

Исправление kostik87, :

А switch_root как раз делает то, что тебе нужно, man switch_root:

SWITCH_ROOT(8)                                                                                           System Administration                                                                                           SWITCH_ROOT(8)

NAME
       switch_root - switch to another filesystem as the root of the mount tree

SYNOPSIS
       switch_root [-hV]

       switch_root newroot init [arg...]

DESCRIPTION
       switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process.
WARNING: switch_root removes recursively all files and directories on the current root filesystem.

Хотя да, значит пробуй move.

Возможно, придётся делать ленивое размонтирование umotun -l /old_root.

Исправление kostik87, :

А switch_root как раз делает то, что тебе нужно, man switch_root:

SWITCH_ROOT(8)                                                                                           System Administration                                                                                           SWITCH_ROOT(8)

NAME
       switch_root - switch to another filesystem as the root of the mount tree

SYNOPSIS
       switch_root [-hV]

       switch_root newroot init [arg...]

DESCRIPTION
       switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process.
WARNING: switch_root removes recursively all files and directories on the current root filesystem.

Хотя да, значит пробуй move.

Исходная версия kostik87, :

А switch_root как раз делает то, что тебе нужно, man switch_root:

SWITCH_ROOT(8)                                                                                           System Administration                                                                                           SWITCH_ROOT(8)

NAME
       switch_root - switch to another filesystem as the root of the mount tree

SYNOPSIS
       switch_root [-hV]

       switch_root newroot init [arg...]

DESCRIPTION
       switch_root moves already mounted /proc, /dev, /sys and /run to newroot and makes newroot the new root filesystem and starts init process.