Terastation V‐Series and 5000 Series (Intel Atom) - 1000001101000/Buildroot_for_Buffalo GitHub Wiki
Summary
Profile for creating a lightweight firmware for Intel Atom based Terastations using the current mainline kernel. My main use case has been creating a firmware that can boot from a cheap USB drive with built in support for iSCSI, ZFS, Docker, etc.
Since these devices work like normal PCs and the images are based on mainline Linux it's relatively simple customize.
Notes
- Uses Buildroot's current default mainline kernel
- Includes customizations from my "Debian on Intel Terastations" project.
- Uses SYSLINUX bootloader
- Uses SystemD Init system.
Installation procedure
The current build process outputs a disk image disk.img
which contains a small boot partition with the bootloader and kernel files and a larger partition with the ext4 filesystem. This can be written directly to a sata or USB disk.
# dd if=output/images/disk.img of=/dev/sdd bs=4k
313344+0 records in
313344+0 records out
1283457024 bytes (1.3 GB, 1.2 GiB) copied, 30.4988 s, 42.1 MB/s
This will leave the secondary GPT header earlier on the disk that it's supposed to be. I haven't seen this cause any issues for these devices though lots of ARM devices would refuse to boot with it like that and it's probably bad practice to leave it like that. Either before putting the disk in the device or even after you can correct this by simply writing out the partition table with gdisk
.
# gdisk /dev/sdd
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sdd: 250069680 sectors, 119.2 GiB
Model:
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): F0453292-0D1C-4DEF-806D-A50C9358F049
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2506718
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 206847 100.0 MiB 8300
2 206848 2506718 1.1 GiB 8300
Command (? for help): w
Warning! Secondary header is placed too early on the disk! Do you want to
correct this problem? (Y/N): y
Have moved second header and partition table to correct location.
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdd.
The operation has completed successfully.