Closed cdwijs closed 3 years ago
I believe I omitted the USB drivers from the installer to keep the size below 7MB. That'll make moving things around a little more difficult but it looks like you have the right idea.
I've done something similar before though only on a temporary basis, here is how I would proceed (you may have already done some of this).
if the usb modules still don't get into the initrd, determine the required modules by looking at the output of lsmod. Then add them to /etc/initramfs-tools/modules and generate a new initrd.
if the initramfs is larger than 6MB or so I'd switch to XZ compression to make it smaller: try creating /etc/initramfs-tools/conf.d/compress with: COMPRESS=xz XZ_OPT=-2e export XZ_OPT
Thanks. What gave you the information that there's a sizelimit of 7MB? Where can I find how much it is exactly, and can this be increased somehow?
I have learned about most of the limitations through trial and error over the years. Most are related to the version/build of uboot these devices use for their bootloader. Buffalo hasn't published their uboot source for most devices which limits the available information to some degree.
Up until very recently I have avoided messing with uboot entirely on these devices because most models are difficult to get a working serial console and because I don't want any possibility of "bricking" devices by using any of my tools. I did make an exception recently for the ls400 since someone on the openwrt project had created a uboot image that fixed an ethernet problem that affected some of those devices.
Here are some of the limitations I'm aware of :
Once I figured out how to get the installer below 7MB by using XZ compression and some other tricks I haven't spent much more time looking into the whole initrd thing. Using the XZ settings listed above normal initrd's come out to like 3MB even with some additional drivers added which is good enough for most use cases.
Thanks. the compress trick got it down from 6.3MB to 4.6MB, and the NAS boots from it, but strangely the image does not look compressed. Next step: adding the USB drivers:
COMPRESS=xz XZ_OPT=-2e export XZ_OPT
MODULES=dep
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/22.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 27775 files and directories currently installed.)
Preparing to unpack .../linux-image-4.12.13_4.12.13-4_armel.deb ...
Unpacking linux-image-4.12.13 (4.12.13-4) over (4.12.13-4) ...
Setting up linux-image-4.12.13 (4.12.13-4) ...
update-initramfs: Generating /boot/initrd.img-4.12.13
I: The initramfs will attempt to resume from /dev/sde2
I: (UUID=f41c8f77-14d3-4906-8acc-0c935040b0d4)
I: Set the RESUME variable to override this.
flash-kernel: deferring update (trigger activated)
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.99) ...
flash-kernel: installing version 4.12.13
Generating kernel u-boot image... done.
Taking backup of uImage.buffalo.
Installing new uImage.buffalo.
Generating initramfs u-boot image... done.
Taking backup of initrd.buffalo.
Installing new initrd.buffalo.
Image Name: ramdisk 4.12.13 Created: Sat Jan 2 03:58:40 2021 Image Type: ARM Linux RAMDisk Image (uncompressed) Data Size: 4809996 Bytes = 4697.26 KiB = 4.59 MiB Load Address: 00000000 Entry Point: 00000000
/boot/initrd.buffalo: u-boot legacy uImage, ramdisk 4.12.13, Linux/ARM, RAMDisk Image (Not compressed), 4809996 bytes, Sat Jan 2 08:58:40 2021, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0x7FAB6BBC, Data CRC: 0xADF5BA00
I've added the USB drivers, and the memory stick is detected before the root filesystem is mounted. My hard drive is /dev/sda, my flash drive is /dev/sde. The flash drive is found before /dev/sda3 is mounted as /
Now I have two options: A) Figure out what in the initrd deceides where the root filesystem is. B) Add the USB drivers to this file, and install debian on my flash drive: https://github.com/1000001101000/Debian_on_Buffalo/raw/master/Buster/installer_images/armel_devices/initrd.buffalo
These messages show the USB stick is found before the root filesystem is mounted: [ 21.752980] usbcore: registered new interface driver usbfs [ 21.788739] usbcore: registered new interface driver hub [ 21.830863] usbcore: registered new device driver usb [ 21.891032] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 21.934245] ehci-orion: EHCI orion driver [ 23.289357] usb-storage 1-1.1:1.0: USB Mass Storage device detected [ 23.296286] scsi host4: usb-storage 1-1.1:1.0 [ 23.306380] usbcore: registered new interface driver usb-storage [ 23.321324] usbcore: registered new interface driver uas [ 24.480029] sd 4:0:0:0: [sde] 30464000 512-byte logical blocks: (15.6 GB/14.5 GiB) [ 24.526640] sd 4:0:0:0: [sde] Write Protect is off [ 24.531471] sd 4:0:0:0: [sde] Mode Sense: 43 00 00 00 [ 24.544039] sd 4:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 24.596973] sde: sde1 sde2 [ 24.628782] sd 4:0:0:0: [sde] Attached SCSI removable disk [ 26.977918] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null) <= mounting of the root filesystem
#
#
#
#
uas usb_storage usbcore ehci_hcd ehci_orion usb_common nls_base scsi_mod
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.12.13 (jeremy@earth) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #4 Tue Nov 3 14:18:55 CST 2020 [ 0.000000] CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=0005317f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine: Buffalo Terastation Pro II/Live [ 0.000000] Clearing invalid memory bank 0KB@0xffffffff [ 0.000000] Clearing invalid memory bank 0KB@0xffffffff [ 0.000000] Clearing invalid memory bank 0KB@0xffffffff [ 0.000000] Ignoring unrecognised tag 0x00000000 [ 0.000000] Ignoring unrecognised tag 0x00000000 [ 0.000000] Ignoring unrecognised tag 0x00000000 [ 0.000000] Ignoring unrecognised tag 0x41000403 [ 0.000000] Memory policy: Data cache writeback [ 0.000000] On node 0 totalpages: 32768 [ 0.000000] free_area_init_node: node 0, pgdat c0598e3c, node_mem_map c7ef9000 [ 0.000000] Normal zone: 256 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 32768 pages, LIFO batch:7 [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.19 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 108492K/131072K available (3802K kernel code, 336K rwdata, 1156K rodata, 320K init, 248K bss, 22580K reserved, 0K cma-reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc8800000 - 0xff800000 ( 880 MB) lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) modules : 0xbf000000 - 0xbfe00000 ( 14 MB) .text : 0xc0008000 - 0xc03beb90 (3803 kB) .init : 0xc0502000 - 0xc0552000 ( 320 kB) .data : 0xc0552000 - 0xc05a6180 ( 337 kB) .bss : 0xc05a9b7c - 0xc05e7ea8 ( 249 kB) [ 0.000000] ftrace: allocating 18101 entries in 36 pages [ 0.000000] NR_IRQS:16 nr_irqs:65 65 [ 0.000000] Switching to timer-based delay loop, resolution 6ns [ 0.000014] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns [ 6.357017] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns [ 6.357772] Console: colour dummy device 80x30 [ 6.357814] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=666666) [ 6.357848] pid_max: default: 32768 minimum: 301 [ 6.358113] Security Framework initialized [ 6.358138] Yama: disabled by default; enable with sysctl kernel.yama. [ 6.358374] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 6.358398] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 6.359666] CPU: Testing write buffer coherency: ok [ 6.360730] Setting up static identity map for 0x8200 - 0x823c [ 6.363933] devtmpfs: initialized [ 6.365537] VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0 [ 6.365773] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 6.365805] futex hash table entries: 256 (order: -1, 3072 bytes) [ 6.366241] pinctrl core: initialized pinctrl subsystem [ 6.367886] NET: Registered protocol family 16 [ 6.368534] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 6.372508] cpuidle: using governor ladder [ 6.372531] cpuidle: using governor menu [ 6.372648] Orion ID: MV88F5281-D0. TCLK=166666667. [ 6.372715] Orion: Applying 5281 D0 WFI workaround. [ 6.372824] initial MPP regs: [ 6.372834] 44440000 [ 6.372842] 00000000 [ 6.372859] 00000000
[ 6.372900] final MPP regs: [ 6.372908] 44440000 [ 6.372916] 00000000 [ 6.372932] 00000000
[ 6.374389] PCI host bridge to bus 0000:00
[ 6.374429] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[ 6.374460] pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
[ 6.374489] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 6.374549] pci 0000:00:00.0: [11ab:5281] type 00 class 0x058000
[ 6.374591] pci 0000:00:00.0: reg 0x10: [mem 0xf1000000-0xf10fffff 64bit pref]
[ 6.374617] pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x07ffffff]
[ 6.374969] PCI: bus0: Fast back to back transfers disabled
[ 6.375004] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 6.375244] PCI host bridge to bus 0001:01
[ 6.375284] pci_bus 0001:01: root bus resource [mem 0xe8000000-0xefffffff]
[ 6.375315] pci_bus 0001:01: root bus resource [io 0x10000-0x1ffff]
[ 6.375344] pci_bus 0001:01: No busn resource found for root bus, will use [bus 01-ff]
[ 6.375412] pci 0001:01:00.0: [11ab:5281] type 00 class 0x058000
[ 6.375459] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x07ffffff 64bit pref]
[ 6.375491] pci 0001:01:00.0: reg 0x18: [mem 0x10000000-0x1fffffff 64bit pref]
[ 6.375523] pci 0001:01:00.0: reg 0x20: [mem 0xf1000000-0xf10fffff 64bit]
[ 6.375552] pci 0001:01:00.0: reg 0x30: [mem 0xe0000000-0xe7ffffff pref]
[ 6.375622] pci 0001:01:00.0: supports D1 D2
[ 6.375639] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot
[ 6.375925] pci 0001:01:07.0: [11ab:6042] type 00 class 0x010000
[ 6.375975] pci 0001:01:07.0: reg 0x10: [mem 0x40000000-0x400fffff 64bit]
[ 6.376005] pci 0001:01:07.0: reg 0x18: [io 0xf0100000-0xf01000ff]
[ 6.376360] PCI: bus1: Fast back to back transfers enabled
[ 6.376396] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[ 6.376458] pci 0001:01:07.0: BAR 0: assigned [mem 0xe8000000-0xe80fffff 64bit]
[ 6.376501] pci 0001:01:07.0: BAR 2: assigned [io 0x10000-0x100ff]
[ 6.384543] clocksource: Switched to clocksource orion_clocksource
[ 6.431604] VFS: Disk quotas dquot_6.6.0
[ 6.431727] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 6.446508] NET: Registered protocol family 2
[ 6.447899] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.447946] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 6.447986] TCP: Hash tables configured (established 1024 bind 1024)
[ 6.448121] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 6.448172] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 6.448490] NET: Registered protocol family 1
[ 6.448647] PCI: CLS 32 bytes, default 32
[ 6.449057] Unpacking initramfs...
[ 7.380576] random: fast init done
[ 11.443967] Initramfs unpacking failed: junk in compressed archive
[ 11.523243] Freeing initrd memory: 15364K
[ 11.524281] audit: initializing netlink subsys (disabled)
[ 11.525130] audit: type=2000 audit(5.164:1): state=initialized audit_enabled=0 res=1
[ 11.525212] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 11.525389] zbud: loaded
[ 20.143021] Key type asymmetric registered
[ 20.143047] Asymmetric key parser 'x509' registered
[ 20.143143] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 20.143424] io scheduler noop registered
[ 20.143564] io scheduler cfq registered (default)
[ 20.144846] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[ 20.146425] console [ttyS0] disabled
[ 20.166609] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 4, base_baud = 10416666) is a 16550A
[ 20.731314] console [ttyS0] enabled
[ 20.755690] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 5, base_baud = 10416666) is a 16550A
[ 20.765619] libphy: Fixed MDIO Bus: probed
[ 20.770175] i2c /dev entries driver
[ 20.777549] rtc-rs5c372 0-0032: rs5c372a found, 24hr
[ 20.787183] rtc rtc0: invalid alarm value: 2021-1-2 45:84:0
[ 20.793074] rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
[ 20.800320] ledtrig-cpu: registered to indicate activity on CPUs
[ 20.807958] registered taskstats version 1
[ 20.812183] zswap: loaded using pool lzo/zbud
[ 20.818768] rtc-rs5c372 0-0032: setting system clock to 2021-01-02 12:08:32 UTC (1609589312)
[ 20.833319] Freeing unused kernel memory: 320K
[ 20.837790] This architecture does not have kernel memory protection.
[ 21.691155] SCSI subsystem initialized
[ 21.752980] usbcore: registered new interface driver usbfs
[ 21.788739] usbcore: registered new interface driver hub
[ 21.803267] libata version 3.00 loaded.
[ 21.810739] sata_mv 0001:01:07.0: version 1.28
[ 21.811132] sata_mv 0001:01:07.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[ 21.830863] usbcore: registered new device driver usb
[ 21.891032] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 21.934245] ehci-orion: EHCI orion driver
[ 21.955424] scsi host0: sata_mv
[ 21.962823] orion-ehci orion-ehci.0: EHCI Host Controller
[ 21.988682] scsi host1: sata_mv
[ 21.998937] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 22.010647] scsi host2: sata_mv
[ 22.031741] scsi host3: sata_mv
[ 22.045682] ata1: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8022000 irq 44
[ 22.053381] ata2: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8024000 irq 44
[ 22.061049] ata3: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8026000 irq 44
[ 22.068713] ata4: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8028000 irq 44
[ 22.076955] orion-ehci orion-ehci.0: irq 18, io mem 0xf1050000
[ 22.120666] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 22.139204] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 22.146039] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 22.153275] usb usb1: Product: EHCI Host Controller
[ 22.158181] usb usb1: Manufacturer: Linux 4.12.13 ehci_hcd
[ 22.163692] usb usb1: SerialNumber: orion-ehci.0
[ 22.265988] hub 1-0:1.0: USB hub found
[ 22.285956] hub 1-0:1.0: 1 port detected
[ 22.556681] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 22.604659] ata1.00: ATA-8: ST3160318AS, CC44, max UDMA/133
[ 22.610265] ata1.00: 312500000 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 22.620590] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 22.680679] ata1.00: configured for UDMA/133
[ 22.685874] scsi 0:0:0:0: Direct-Access ATA ST3160318AS CC44 PQ: 0 ANSI: 5
[ 22.773120] usb 1-1: New USB device found, idVendor=0409, idProduct=005a
[ 22.779860] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 22.798154] hub 1-1:1.0: USB hub found
[ 22.806662] hub 1-1:1.0: 4 ports detected
[ 23.096594] usb 1-1.1: new high-speed USB device number 3 using orion-ehci
[ 23.172609] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 23.201086] ata2.00: ATA-8: SAMSUNG HD321KJ, CP100-10, max UDMA7
[ 23.207122] ata2.00: 625142448 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 23.216650] ata2.00: configured for UDMA/133
[ 23.221706] scsi 1:0:0:0: Direct-Access ATA SAMSUNG HD321KJ 0-10 PQ: 0 ANSI: 5
[ 23.234491] usb 1-1.1: New USB device found, idVendor=0781, idProduct=5567
[ 23.241416] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 23.248764] usb 1-1.1: Product: Cruzer Blade
[ 23.253059] usb 1-1.1: Manufacturer: SanDisk
[ 23.257352] usb 1-1.1: SerialNumber: 4C530003050719115581
[ 23.289357] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 23.296286] scsi host4: usb-storage 1-1.1:1.0
[ 23.306380] usbcore: registered new interface driver usb-storage
[ 23.321324] usbcore: registered new interface driver uas
[ 23.736609] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 23.747563] ata3.00: ATA-7: Hitachi HDS721010KLA330, GKAOA70M, max UDMA/133
[ 23.754554] ata3.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 23.768369] ata3.00: configured for UDMA/133
[ 23.773419] scsi 2:0:0:0: Direct-Access ATA Hitachi HDS72101 A70M PQ: 0 ANSI: 5
[ 24.256618] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 24.267571] ata4.00: ATA-8: Hitachi HDT721010SLA360, ST6OA31B, max UDMA/133
[ 24.274553] ata4.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 24.288370] ata4.00: configured for UDMA/133
[ 24.293382] scsi 3:0:0:0: Direct-Access ATA Hitachi HDT72101 A31B PQ: 0 ANSI: 5
[ 24.325946] scsi 4:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6
[ 24.412892] sd 0:0:0:0: [sda] 312500000 512-byte logical blocks: (160 GB/149 GiB)
[ 24.435513] sd 1:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 24.444205] sd 2:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 24.455429] sd 3:0:0:0: [sdd] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 24.469364] sd 0:0:0:0: [sda] Write Protect is off
[ 24.474245] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 24.475028] sd 1:0:0:0: [sdb] Write Protect is off
[ 24.479901] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 24.480029] sd 4:0:0:0: [sde] 30464000 512-byte logical blocks: (15.6 GB/14.5 GiB)
[ 24.488139] sd 2:0:0:0: [sdc] Write Protect is off
[ 24.492981] sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 24.493151] sd 3:0:0:0: [sdd] Write Protect is off
[ 24.498016] sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[ 24.498301] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 24.507839] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 24.517459] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 24.526640] sd 4:0:0:0: [sde] Write Protect is off
[ 24.531471] sd 4:0:0:0: [sde] Mode Sense: 43 00 00 00
[ 24.531756] sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 24.544039] sd 4:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 24.564398] sda: sda1 sda2 sda3 sda4
[ 24.591490] sd 0:0:0:0: [sda] Attached SCSI disk
[ 24.596973] sde: sde1 sde2
[ 24.601737] sdc: sdc1 sdc4 < sdc5 sdc6 >
[ 24.605915] sdd: sdd1 sdd4 < sdd5 sdd6 >
[ 24.612764] sdb:
[ 24.621990] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 24.628782] sd 4:0:0:0: [sde] Attached SCSI removable disk
[ 24.646519] sd 3:0:0:0: [sdd] Attached SCSI disk
[ 24.651324] sd 2:0:0:0: [sdc] Attached SCSI disk
[ 24.941978] random: crng init done
[ 26.977918] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 28.525454] systemd[1]: Inserted module 'autofs4'
[ 28.603507] NET: Registered protocol family 10
[ 28.609527] Segment Routing with IPv6
[ 28.637143] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 28.663320] cgroup: cgroup2: unknown option "nsdelegate"
[ 28.729146] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[ 28.751345] systemd[1]: Detected architecture arm.
[ 28.793537] systemd[1]: Set hostname to
One thing to note is that the initrd will set the rootfs based on what you have in your /etc/fstab.
could you post the output of lsblk?
Thanks, I have first regenerated initrd, and only afterwards edited my /etc/fstab. I should have regenerated initrd after editing /etc/fstab.
After doing the below steps again, and a reboot it works! I now have a NAS that runs from a memory stick :-)
Thanks for all your help, I doubt if I would have succeeded without your knowledge and encouragement.
I want to boot from /dev/sde1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 149G 0 disk ├─sda1 8:1 0 512M 0 part /boot ├─sda2 8:2 0 1G 0 part ├─sda3 8:3 0 10G 0 part / └─sda4 8:4 0 137.5G 0 part sdb 8:16 0 298.1G 0 disk sdc 8:32 0 931.5G 0 disk ├─sdc1 8:33 0 30G 0 part ├─sdc4 8:36 0 1K 0 part ├─sdc5 8:37 0 1K 0 part └─sdc6 8:38 0 901.5G 0 part sdd 8:48 0 931.5G 0 disk ├─sdd1 8:49 0 30G 0 part ├─sdd4 8:52 0 1K 0 part ├─sdd5 8:53 0 1K 0 part └─sdd6 8:54 0 901.5G 0 part sde 8:64 1 14.5G 0 disk ├─sde1 8:65 1 5G 0 part └─sde2 8:66 1 1G 0 part [SWAP] mtdblock0 31:0 0 256K 0 disk
total 0 lrwxrwxrwx 1 root root 10 Jan 2 07:09 24a727b4-771b-4e81-8822-a6d241623136 -> ../../sde1
UUID=24a727b4-771b-4e81-8822-a6d241623136 / ext4 errors=remount-ro 0 1 UUID=2bb94806-50be-46b4-a036-c82ec89bc765 /boot ext3 defaults 0 2 UUID=f41c8f77-14d3-4906-8acc-0c935040b0d4 none swap sw 0 0
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/22.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 27775 files and directories currently installed.)
Preparing to unpack .../linux-image-4.12.13_4.12.13-4_armel.deb ...
Unpacking linux-image-4.12.13 (4.12.13-4) over (4.12.13-4) ...
Setting up linux-image-4.12.13 (4.12.13-4) ...
update-initramfs: Generating /boot/initrd.img-4.12.13
I: The initramfs will attempt to resume from /dev/sde2
I: (UUID=f41c8f77-14d3-4906-8acc-0c935040b0d4)
I: Set the RESUME variable to override this.
flash-kernel: deferring update (trigger activated)
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.99) ...
flash-kernel: installing version 4.12.13
Generating kernel u-boot image... done.
Taking backup of uImage.buffalo.
Installing new uImage.buffalo.
Generating initramfs u-boot image... done.
Taking backup of initrd.buffalo.
Installing new initrd.buffalo.
The UUID from my memory stick is now correct in initrd.buffalo:
ROOT="/dev/disk/by-uuid/24a727b4-771b-4e81-8822-a6d241623136"
Filesystem Size Used Avail Use% Mounted on udev 53M 0 53M 0% /dev tmpfs 26M 1.7M 25M 7% /run /dev/sde1 4.9G 935M 3.7G 20% / <YESSSS!!!!! tmpfs 61M 0 61M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 61M 0 61M 0% /sys/fs/cgroup /dev/sda1 492M 61M 406M 13% /boot tmpfs 13M 0 13M 0% /run/user/1000
Great!
Hi There,
I have a Buffalo Terrastation Pro TS-HTGL/R5 TS-H4.0TGL/R5 BUF-TS-HTGLR5(A). I can use your installer just fine to install Debian 10.7 on it.
In order to save noise and heat, I would like to keep the hard drives in idle, until a file is requested from the network. To this end I would like to put the root filesystem on a thumb drive. Problem is that the debian installer does not allow partitions and mountpoints to be made on the thumb drive. After the NAS is booted completely, Debian can access the thumb drive without issue.
I guess both the installer initrd.buffalo / uImage.buffalo and the installed Debian initrd / uImage pair don't have the driver to access a USB thumb drive.
I've tried to generate an initrd.buffalo with most of the drivers, but that does not boot. I suspect it's too large (>7MB), as stated here: https://github.com/1000001101000/Deb...falo/issues/67
What driver must be included in the initrd to allow for root filesystem on a memory stick?
Here's what I've done:
cat /etc/initramfs-tools/conf.d/modules
MODULES=dep
nano /etc/initramfs-tools/conf.d/modules
cat /etc/initramfs-tools/conf.d/modules
MODULES=most
apt-get reinstall linux-image-4.12.13
Reading package lists... Done Building dependency tree
Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 22.2 MB of archives. After this operation, 0 B of additional disk space will be used. Get:1 https://raw.githubusercontent.com/1000001101000/Debian_on_Buffalo/master/PPA buster/main armel linux-image-4.12.13 armel 4.12.13-4 [22.2 MB] Fetched 22.2 MB in 15s (1,495 kB/s)
(Reading database ... 27554 files and directories currently installed.) Preparing to unpack .../linux-image-4.12.13_4.12.13-4_armel.deb ... Unpacking linux-image-4.12.13 (4.12.13-4) over (4.12.13-4) ... Setting up linux-image-4.12.13 (4.12.13-4) ... update-initramfs: Generating /boot/initrd.img-4.12.13 I: The initramfs will attempt to resume from /dev/sda2 I: (UUID=a4ebb9fd-00ba-46ff-a448-165d6e21a7b8) I: Set the RESUME variable to override this. flash-kernel: deferring update (trigger activated) flash-kernel: deferring update (trigger activated) Processing triggers for flash-kernel (3.99) ... flash-kernel: installing version 4.12.13 Generating kernel u-boot image... done. Taking backup of uImage.buffalo. Installing new uImage.buffalo. Generating initramfs u-boot image... done. Taking backup of initrd.buffalo. Installing new initrd.buffalo.
ls -l /boot/
total 44140 -rw-r--r-- 1 root root 164677 Nov 3 15:19 config-4.12.13 drwxr-xr-x 2 root root 4096 Dec 28 08:56 hidden -rw-r--r-- 1 root root 15327846 Dec 28 10:07 initrd.buffalo -rw-r--r-- 1 root root 6551033 Dec 9 11:32 initrd.buffalo.bak -rw-r--r-- 1 root root 15327782 Dec 28 10:07 initrd.img-4.12.13 drwx------ 2 root root 16384 Dec 9 05:50 lost+found -rw-r--r-- 1 root root 1549426 Nov 3 15:19 System.map-4.12.13 -rw-r--r-- 1 root root 2055672 Dec 28 10:07 uImage.buffalo -rw-r--r-- 1 root root 2055672 Dec 9 11:32 uImage.buffalo.bak -rwxr-xr-x 1 root root 2055600 Nov 3 15:19 vmlinuz-4.12.13
file initrd.buffalo
file initrd.buffalo.bak
initrd.buffalo.bak: 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 initrd.buffalo
Image Name: ramdisk 4.12.13 Created: Mon Dec 28 16:07:50 2020 Image Type: ARM Linux RAMDisk Image (uncompressed) Data Size: 15327782 Bytes = 14968.54 KiB = 14.62 MiB Load Address: 00000000 Entry Point: 00000000
mkimage -l initrd.buffalo.bak
Image Name: ramdisk 4.12.13 Created: Wed Dec 9 17: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: 00000000