OpenWRT x86 Style Disks and Booting: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
For this experiment EXT 4 will be used (as opposed to SquashFS) | For this experiment EXT 4 will be used (as opposed to SquashFS). | ||
<br /> | |||
===For Cloning a Drive=== | ===For Cloning a Drive=== | ||
Line 26: | Line 28: | ||
*The "MBR Gap" for OpenWRT's x86 "flavor" is 511 Sectors (Sectors 2 - 511, 512 is the beginning of the first partition, AKA /boot Partition). That's just how it is for OpenWRT because it is what they decided. And just as a historical note, the "MBR Gap" is almost twice as big as the entire capacity of a Commodore 1541 disk (single sided is 170K). And don't think OpenWRT is being wasteful of space either. If one uses CFDISK (or equivalent), the MBR GAP is 2048 Sectors (4 times that of OpenWRT, still 512 Bytes per Sector). | *The "MBR Gap" for OpenWRT's x86 "flavor" is 511 Sectors (Sectors 2 - 511, 512 is the beginning of the first partition, AKA /boot Partition). That's just how it is for OpenWRT because it is what they decided. And just as a historical note, the "MBR Gap" is almost twice as big as the entire capacity of a Commodore 1541 disk (single sided is 170K). And don't think OpenWRT is being wasteful of space either. If one uses CFDISK (or equivalent), the MBR GAP is 2048 Sectors (4 times that of OpenWRT, still 512 Bytes per Sector). | ||
*If conv=sync is used an out of space error will occur. | *If conv=sync is used an out of space error will occur. | ||
=== To Convert a SquashFS version of OpenWRT to an EXT4 version of OpenWRT === | |||
* Copy the MBR, "MBR Gap", and First Partition ( /boot Directory ) per the "Cloning a Drive" Section | |||
* Edit the /boot/grub/grub.cfg file, changing portion of the ''menuentry'', from <code>rootfstype=squashfs</code> to <code>rootfstype=ext4</code> | |||
* Format the Second Partition: <code>mkfs.ext4 -L WhatEverName -v /dev/sda2 (-L = Label (can be named ROOT for clarity), -v = Verbose)</code> | |||
* Resize the Second Partition (if cloned from a "Virgin OpenWRT" install) to a larger size using GParted or CFDISK (16 GB is more than enough) | |||
Tips; | |||
* Use GParted to Locate Mount Points and to resize Partitions (if using a Live Rocky Linux, CentOS, etc. USB Based , the mount points en |