Results 1 to 1 of 1
I am using Amazon Web Services EC2 EBS (elastic block storage), which just came out. This provides a means of making a permanent file system for a cloud computing server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-23-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 17
Using pivot_root and chroot to change the root directory upon bootup
I am using Amazon Web Services EC2 EBS (elastic block storage), which just came out. This provides a means of making a permanent file system for a cloud computing server but in order to do this it is necessary to mount a new filesystem and then to change the root directory to that filesystem. In order to do this, so far I have gathered that something like this may work (replacing the original /sbin/init file with a shell script containing the code below):
mount /dev/sdi /real_root
cd /real_root
pivot_root . old_root
exec chroot . /sbin/init
/sbin/init
I have tried this but I lose the machine (instance), so far I have been unable to figure out what is going wrong, I would appreciate if anyone has any advice.


Reply With Quote
