BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000543 [BusyBox] Other major always 11-14-05 07:59 02-05-06 18:41
Reporter zlosch View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0000543: switch_root fails
Description I have noticed that switch_root does not work. Looking into run_init.c from klibc I found out that you are missing a chroot statement after the move-mount.

Additionally, I would like switch_root to be a little less verbose about deleting the old root's contents... ;-) (ok, this looks to be debug code at the moment...)
Additional Information Solution:

change

  if (mount(".", "/", NULL, MS_MOVE, NULL) || chdir("/"))
          bb_error_msg_and_die("moving root");

to

  if (mount(".", "/", NULL, MS_MOVE, NULL) || chroot(".") || chdir("/"))
          bb_error_msg_and_die("moving root");
Attached Files

- Relationships

- Notes
(0001043)
landley
02-05-06 18:41

Fixed back before the 1.1.0 release. If anything's still wrong with switch_root for you, open a new bug with current symptoms.
 

- Issue History
Date Modified Username Field Change
11-14-05 07:59 zlosch New Issue
11-14-05 07:59 zlosch Status new => assigned
11-14-05 07:59 zlosch Assigned To  => BusyBox
02-05-06 18:41 landley Status assigned => closed
02-05-06 18:41 landley Note Added: 0001043
02-05-06 18:41 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker