mirror of
https://github.com/fspc/gbootroot.git
synced 2025-03-04 11:53:26 -05:00
The program which allows normal users to create root_fs larger than 8192.
This commit is contained in:
parent
33aff73679
commit
0db19feb82
41
expect_uml
Executable file
41
expect_uml
Executable file
@ -0,0 +1,41 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use BootRoot::UML;
|
||||
|
||||
if ( !$ARGV[0] ) {
|
||||
|
||||
die "expect_uml host-systems-kernel-version ubd0 ubd1 other-options mount-point\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
my $arguments = "$ARGV[1] $ARGV[2] $ARGV[3]";
|
||||
my $mount_point = "$ARGV[4]";
|
||||
|
||||
|
||||
my $uml =
|
||||
BootRoot::UML->new( login_prompt => "bootroot login: ",
|
||||
arguments => $arguments,
|
||||
login => "root",
|
||||
password_prompt => "Password: ",
|
||||
password => "",
|
||||
prompt => "bootroot:.*# ",
|
||||
halt => "shutdown -h now"
|
||||
);
|
||||
|
||||
$uml->boot();
|
||||
$uml->command("mke2fs -m0 /dev/ubd/1");
|
||||
$uml->command("mount /dev/ubd/1 /mnt1");
|
||||
$uml->command("mount -t hostfs none -o $mount_point /mnt2");
|
||||
$uml->command("cp -a /mnt2/* /mnt1");
|
||||
$uml->command("chown -R 0:0 /mnt1");
|
||||
$uml->command("umount /mnt1; umount /mnt2");
|
||||
$uml->halt();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user