dispositivo pivot_root ou recurso ocupado

3

Os seguintes comandos no Ubuntu 64bit no VMWare:

mount /dev/sda1 /newroot
cd /newroot
mkdir old-root
pivot_root . old-root

produz um erro que não entendo:

pivot_root: device or resource busy

Alguma idéia de qual pode ser a razão disso?

Editar: resultado strace

'strace pivot_root . old-root 
execve("/usr/sbin/pivot_root", ["pivot_root", ".", "old-root"], [/* 67 vars */]) = 0
brk(0)                                  = 0x77e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2df4135000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=124467, ...}) = 0
mmap(NULL, 124467, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2df4116000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF
mount /dev/sda1 /newroot
cd /newroot
mkdir old-root
pivot_root . old-root
pivot_root: device or resource busy
'strace pivot_root . old-root 
execve("/usr/sbin/pivot_root", ["pivot_root", ".", "old-root"], [/* 67 vars */]) = 0
brk(0)                                  = 0x77e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2df4135000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=124467, ...}) = 0
mmap(NULL, 124467, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2df4116000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "7ELF%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%>%pre%%pre%%pre%%pre%pb%pre%75%pre%%pre%%pre%"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2096496, ...}) = 0'
%pre%%pre%%pre%%pre%%pre%%pre%>%pre%%pre%%pre%%pre%pb%pre%75%pre%%pre%%pre%"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=2096496, ...}) = 0'
    
por lukassz 18.01.2015 / 23:45

1 resposta

1

Você deve desmontar o sistema de arquivos / proc primeiro e depois executar seu conjunto original de comandos.

umount /proc
mount /dev/sda1 /newroot
cd /newroot
mkdir old-root
pivot_root . old-root
    
por 09.04.2016 / 17:56

Tags