Article 5C57K install Debian on a thumb drive on my Buffalo Terrastation fails, on HDD OK.

install Debian on a thumb drive on my Buffalo Terrastation fails, on HDD OK.

by
cedric!
from LinuxQuestions.org on (#5C57K)
I've installed Debian on the hard drive of my Nas. This works OK, but I want to run Debian from a thumb drive, so the hard drives in the NAS can stay idle while the NAS waits for requests for files from the network.

My NAS first boots from it's ROM. Next it looks in the first partition of the first hard drive, and then it loads initrd.buffalo and uImage.buffalo. Finally initrd/uImage mount /dev/sda3 as the root file system, and the rest of the system is booted from there.

I've copied the root filesystem on a flash drive (Using dd to preserve the UUID), and removed that partition from the hard drive. This causes the NAS to not find the root filesystem. (I can see it loading the kernel, and at the moment it should load from the root filesystem, the NAS reboots).

Next I've tried to extract initrd.buffalo, modify it to find the flash drive, but I could not generate an initrd.buffalo that was bootable.

How can I make the Debian installer to see the flash drive, and create the root partition on it?
How can I unpack / edit / repack initrd.buffalo?
How can I modify initrd.buffalo to mount the flash drive as the root partition?

My NAS:
Code:Buffalo Terrastation Pro TS-HTGL/R5 TS-H4.0TGL/R5 BUF-TS-HTGLR5(A)Files used to install Debian:
Code:wget https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Buster/installer_images/armel_devices/initrd.buffalo
wget https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Buster/installer_images/armel_devices/uImage.buffalo.ts2pro
mv uImage.buffalo.ts2pro uImage.buffaloMy versions:
Code:Debian 10.7
Linux debian 4.12.13 #4 Tue Nov 3 14:18:55 CST 2020 armv5tel GNU/LinuLayout of the first hard drive: (Second hard drive is blank)
Code:Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1050623 1048576 512M 83 Linux
/dev/sda2 1050624 3147775 2097152 1G 82 Linux swap / Solaris
/dev/sda3 3147776 24119295 20971520 10G 83 LinuxInformation on the boot files:
Code:# file /boot/uImage.buffalo
/boot/uImage.buffalo: u-boot legacy uImage, kernel 4.12.13, Linux/ARM, OS Kernel Image (Not compressed), 2055608 bytes, Wed Dec 9 16:32:04 2020, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0xBAF14FA9, Data CRC: 0x913E9D2F

# mkimage -l /boot/uImage.buffalo
Image Name: kernel 4.12.13
Created: Wed Dec 9 11:32:04 2020
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2055608 Bytes = 2007.43 KiB = 1.96 MiB
Load Address: 00008000
Entry Point: 00008000

# file initrd.buffalo
initrd.buffalo: u-boot legacy uImage, ramdisk 4.12.13, Linux/ARM, RAMDisk Image (Not compressed), 6550969 bytes, Wed Dec 9 16:32:05 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xAF161477, Data CRC: 0x5B936D6E

# mkimage -l /boot/initrd.buffalo
Image Name: ramdisk 4.12.13
Created: Wed Dec 9 11:32:05 2020
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 6550969 Bytes = 6397.43 KiB = 6.25 MiB
Load Address: 00000000
Entry Point: 00000000latest?d=yIl2AUoC8zA latest?i=vs_UugjtMgA:NVykFowE1bM:F7zBnMy latest?i=vs_UugjtMgA:NVykFowE1bM:V_sGLiP latest?d=qj6IDK7rITs latest?i=vs_UugjtMgA:NVykFowE1bM:gIN9vFwvs_UugjtMgA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments