Panowie ponieważ w swoim ruterze mam małego flasza postanowiłem zrobić extroota. W tym celu użyłem 8 GB . Na komputerze zrobiłem dwie partycje sformatowane EXT4 ,pierwszą nazwałem extroot a drugą swap.
Teraz zamierzam postępować tak :
# opkg update
# opkg install e2fsprogs # jeżeli nie ma go jeszcze w obrazie
# mkfs.ext4 -m 0 /dev/sda1
# mkfs.ext4 -m 0 /dev/sda2
Czy to jest konieczne jeżeli są już sformatowane?
# opkg update
# opkg install block-mount kmod-fs-ext4 # jeżeli nie ma ich jeszcze w obrazie
# block detect > /etc/config/fstab
# uci set fstab.@mount[0].target='/overlay'
# uci set fstab.@mount[0].enabled='1'
# uci set fstab.@global[0].check_fs='1'
# uci commit fstab
# reboot
# opkg update
# opkg install block-mount kmod-fs-ext4 # jeżeli nie ma ich jeszcze w obrazie
# block detect > /etc/config/fstab
# uci set fstab.@mount[0].target='/overlay'
# uci set fstab.@mount[0].enabled='1'
# uci set fstab.@global[0].check_fs='1'
# uci commit fstab
# reboot
root@OpenWrt:# fdisk /dev/sda2
The number of cylinders for this disk is set to 7301.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): d
Selected partition 1
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-7301, default 1): <enter>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-7301, default 7301): +64M
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap / Solaris)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (132-7301, default 132): <enter>
Using default value 132
Last cylinder or +size or +sizeM or +sizeK (1-7301, default 7301): <enter>
Using default value 7301
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@OpenWrt:#