-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinal-unpack.txt
53 lines (47 loc) · 1.99 KB
/
final-unpack.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
This part can't be all-included, and need the person actions.
When all scripts are passed, it is time to transfer target-system to the place where it will be loaded from.
Assume it is USB flash stick. If it is your HDD - edit /etc/fstab and /etc/init.d/rcS
for a system and SWAP partitions in the end.
My USB flash stick is 16Gb size and it's partitions:
1 FAT32 9.6Gb
2 SWAP 2.0Gb
3 EXT4 4.3Gb
To do:
copy PS2Linux5.4.ELF to USB_FAT32/ps2linux
copy /usr/local/ps2/mipsr5900el-unknown-linux-gnu/* to USB_EXT4
copy /lib/modules/5.4.X to USB_EXT4/lib/modules/
unpack PS2Linux-etc.tar.bz2 to USB_EXT4
go to USB_EXT4 and create folders:
/usr
/usr/local
/usr/local/ps2
go to /usr/local/ps2 and make a symlink:
ln -s ../../../ mipsr5900el-unknown-linux-gnu
go to /dev and make here a device nodes. There is a devcreator.sh script file placed here after PS2Linux-etc.tar.bz2 was unpacked, so you may do "sh devcreator.sh" for that purpose. If you need some other device nodes not presented in that script file, then you have to create them manually.
unmount USB_EXT4 partition and check it for errors:
e2fsck -fy /dev/USB_EXT4_node
Plug this USB flash stick to PS2, launch PS2Linux5.4.ELF . Once booted, enter these commands:
mount -t ext4 -o rw /dev/USB_EXT4_node /mnt
mount --bind /proc /mnt/proc
busybox chroot /mnt
/sbin/pwconv
/sbin/grpconv
/sbin/groupadd bin
/sbin/groupadd daemon
/sbin/groupadd nobody
/sbin/useradd bin -u 1 -g bin -d /bin -s /sbin/nologin
/sbin/useradd daemon -u 2 -g daemon -d /sbin -s /sbin/nologin
/sbin/useradd nobody -u 99 -g nobody -d / -s /sbin/nologin
/sbin/groupmod -g 1 bin
/sbin/groupmod -g 2 daemon
/sbin/groupmod -g 99 nobody
umount /mnt/proc
umount /mnt
These will be needed when you successfully loaded to the system and want to use ssh
connections.
groupadd -g 33 sshd
useradd -u 33 -g 33 -c sshd -d / sshd
ssh-keygen -t rsa -f /etc/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh_host_dsa_key
ssh-keygen -t ecdsa -f /etc/ssh_host_ecdsa_key
ssh-keygen -t ed25519 -f /etc/ssh_host_ed25519_key