LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-28-2020, 07:53 AM   #1
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Rep: Reputation: Disabled
install Debian on a thumb drive on my Buffalo Terrastation fails, on HDD OK.


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.buffalo
My versions:
Code:
Debian 10.7
Linux debian 4.12.13 #4 Tue Nov 3 14:18:55 CST 2020 armv5tel GNU/Linu
Layout 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 Linux
Information 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:  00000000
 
Old 12-28-2020, 07:55 AM   #2
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
dmesg
Code:
[    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=1*32768
[    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
[    2.669316] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    2.670072] Console: colour dummy device 80x30
[    2.670114] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=666666)
[    2.670149] pid_max: default: 32768 minimum: 301
[    2.670413] Security Framework initialized
[    2.670438] Yama: disabled by default; enable with sysctl kernel.yama.*
[    2.670674] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.670698] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.671967] CPU: Testing write buffer coherency: ok
[    2.673032] Setting up static identity map for 0x8200 - 0x823c
[    2.676236] devtmpfs: initialized
[    2.677838] VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
[    2.678074] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    2.678106] futex hash table entries: 256 (order: -1, 3072 bytes)
[    2.678542] pinctrl core: initialized pinctrl subsystem
[    2.680184] NET: Registered protocol family 16
[    2.680833] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    2.684805] cpuidle: using governor ladder
[    2.684828] cpuidle: using governor menu
[    2.684946] Orion ID: MV88F5281-D0. TCLK=166666667.
[    2.685013] Orion: Applying 5281 D0 WFI workaround.
[    2.685119] initial MPP regs:
[    2.685129]  44440000
[    2.685137]  00000000
[    2.685154]  00000000

[    2.685195]   final MPP regs:
[    2.685204]  44440000
[    2.685211]  00000000
[    2.685227]  00000000

[    2.686689] PCI host bridge to bus 0000:00
[    2.686730] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    2.686760] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
[    2.686789] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.686849] pci 0000:00:00.0: [11ab:5281] type 00 class 0x058000
[    2.686892] pci 0000:00:00.0: reg 0x10: [mem 0xf1000000-0xf10fffff 64bit pref]
[    2.686919] pci 0000:00:00.0: reg 0x18: [mem 0x00000000-0x07ffffff]
[    2.687270] PCI: bus0: Fast back to back transfers disabled
[    2.687305] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    2.687546] PCI host bridge to bus 0001:01
[    2.687586] pci_bus 0001:01: root bus resource [mem 0xe8000000-0xefffffff]
[    2.687617] pci_bus 0001:01: root bus resource [io  0x10000-0x1ffff]
[    2.687646] pci_bus 0001:01: No busn resource found for root bus, will use [bus 01-ff]
[    2.687715] pci 0001:01:00.0: [11ab:5281] type 00 class 0x058000
[    2.687762] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x07ffffff 64bit pref]
[    2.687794] pci 0001:01:00.0: reg 0x18: [mem 0x10000000-0x1fffffff 64bit pref]
[    2.687826] pci 0001:01:00.0: reg 0x20: [mem 0xf1000000-0xf10fffff 64bit]
[    2.687854] pci 0001:01:00.0: reg 0x30: [mem 0xe0000000-0xe7ffffff pref]
[    2.687925] pci 0001:01:00.0: supports D1 D2
[    2.687942] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot
[    2.688227] pci 0001:01:07.0: [11ab:6042] type 00 class 0x010000
[    2.688276] pci 0001:01:07.0: reg 0x10: [mem 0x40000000-0x400fffff 64bit]
[    2.688306] pci 0001:01:07.0: reg 0x18: [io  0xf0100000-0xf01000ff]
[    2.688663] PCI: bus1: Fast back to back transfers enabled
[    2.688698] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    2.688760] pci 0001:01:07.0: BAR 0: assigned [mem 0xe8000000-0xe80fffff 64bit]
[    2.688804] pci 0001:01:07.0: BAR 2: assigned [io  0x10000-0x100ff]
[    2.696842] clocksource: Switched to clocksource orion_clocksource
[    2.743931] VFS: Disk quotas dquot_6.6.0
[    2.744054] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.758891] NET: Registered protocol family 2
[    2.760282] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.760329] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.760369] TCP: Hash tables configured (established 1024 bind 1024)
[    2.760504] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.760554] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.760929] NET: Registered protocol family 1
[    2.761033] PCI: CLS 32 bytes, default 32
[    2.761444] Unpacking initramfs...
[    3.692876] random: fast init done
[    3.859380] Initramfs unpacking failed: junk in compressed archive
[    3.938612] Freeing initrd memory: 15364K
[    3.939653] audit: initializing netlink subsys (disabled)
[    3.940445] audit: type=2000 audit(1.267:1): state=initialized audit_enabled=0 res=1
[    3.940527] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    3.940703] zbud: loaded
[   12.557840] Key type asymmetric registered
[   12.557866] Asymmetric key parser 'x509' registered
[   12.557962] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[   12.558241] io scheduler noop registered
[   12.558381] io scheduler cfq registered (default)
[   12.559611] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[   12.561237] console [ttyS0] disabled
[   12.581416] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 4, base_baud = 10416666) is a 16550A
[   13.146138] console [ttyS0] enabled
[   13.170507] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 5, base_baud = 10416666) is a 16550A
[   13.180396] libphy: Fixed MDIO Bus: probed
[   13.184999] i2c /dev entries driver
[   13.192378] rtc-rs5c372 0-0032: rs5c372a found, 24hr
[   13.202021] rtc rtc0: invalid alarm value: 2020-12-28 45:84:0
[   13.208091] rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
[   13.215339] ledtrig-cpu: registered to indicate activity on CPUs
[   13.222964] registered taskstats version 1
[   13.227170] zswap: loaded using pool lzo/zbud
[   13.233793] rtc-rs5c372 0-0032: setting system clock to 2020-12-28 13:00:00 UTC (1609160400)
[   13.248303] Freeing unused kernel memory: 320K
[   13.252777] This architecture does not have kernel memory protection.
[   14.077224] SCSI subsystem initialized
[   14.171001] libata version 3.00 loaded.
[   14.178481] sata_mv 0001:01:07.0: version 1.28
[   14.178880] sata_mv 0001:01:07.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
[   14.302747] scsi host0: sata_mv
[   14.323919] scsi host1: sata_mv
[   14.347581] scsi host2: sata_mv
[   14.365001] scsi host3: sata_mv
[   14.368594] ata1: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8022000 irq 44
[   14.376283] ata2: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8024000 irq 44
[   14.383947] ata3: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8026000 irq 44
[   14.391609] ata4: SATA max UDMA/133 mmio m1048576@0xe8000000 port 0xe8028000 irq 44
[   14.876918] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   14.924957] ata1.00: ATA-8: ST3160318AS, CC44, max UDMA/133
[   14.930551] ata1.00: 312500000 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.000973] ata1.00: configured for UDMA/133
[   15.006031] scsi 0:0:0:0: Direct-Access     ATA      ST3160318AS      CC44 PQ: 0 ANSI: 5
[   15.488914] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   15.517263] ata2.00: ATA-8: SAMSUNG HD321KJ, CP100-10, max UDMA7
[   15.523292] ata2.00: 625142448 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.532759] ata2.00: configured for UDMA/133
[   15.537810] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD321KJ  0-10 PQ: 0 ANSI: 5
[   15.863661] ata3: SATA link down (SStatus 0 SControl 300)
[   16.183660] ata4: SATA link down (SStatus 0 SControl 300)
[   16.286542] sd 0:0:0:0: [sda] 312500000 512-byte logical blocks: (160 GB/149 GiB)
[   16.298052] sd 1:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[   16.308960] sd 0:0:0:0: [sda] Write Protect is off
[   16.313789] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   16.313956] sd 1:0:0:0: [sdb] Write Protect is off
[   16.318786] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[   16.319058] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   16.328374] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   16.357487]  sda: sda1 sda2 sda3 sda4
[   16.369586] sd 0:0:0:0: [sda] Attached SCSI disk
[   16.405697]  sdb:
[   16.411085] sd 1:0:0:0: [sdb] Attached SCSI disk
[   18.090442] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   18.485548] random: crng init done
[   19.556811] systemd[1]: Inserted module 'autofs4'
[   19.622159] NET: Registered protocol family 10
[   19.628145] Segment Routing with IPv6
[   19.662504] ip_tables: (C) 2000-2006 Netfilter Core Team
[   19.690577] cgroup: cgroup2: unknown option "nsdelegate"
[   19.756301] 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)
[   19.778463] systemd[1]: Detected architecture arm.
[   19.820762] systemd[1]: Set hostname to <debian>.
[   22.097137] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[   22.114221] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[   22.935941] systemd[1]: /lib/systemd/system/smbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; please update the unit file accordingly.
[   22.982356] systemd[1]: /lib/systemd/system/nmbd.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /run/samba/nmbd.pid; please update the unit file accordingly.
[   23.033813] systemd[1]: /etc/systemd/system/micon_boot.service:5: Unknown lvalue 'Restart' in section 'Unit', ignoring
[   23.044674] systemd[1]: /etc/systemd/system/micon_boot.service:6: Unknown lvalue 'RestartSec' in section 'Unit', ignoring
[   23.302497] systemd[1]: Created slice User and Session Slice.
[   24.586813] EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro
[   24.787064] systemd[1]: Starting Create System Users...
[   24.925735] systemd[1]: Started Apply Kernel Variables.
[   25.365126] systemd[1]: Started Load/Save Random Seed.
[   25.537111] systemd[1]: Started Create System Users.
[   25.594882] systemd[1]: Starting Create Static Device Nodes in /dev...
[   25.689089] systemd[1]: Started udev Coldplug all Devices.
[   25.746407] systemd[1]: Starting Helper to synchronize boot up for ifupdown...
[   25.806083] systemd[1]: Started Journal Service.
[   26.224063] systemd-journald[147]: Received request to flush runtime journal from PID 1
[   27.010991] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   27.061300] libphy: PHY orion-mdio-mii:00 not found
[   27.066229] libphy: PHY orion-mdio-mii:01 not found
[   27.071139] libphy: PHY orion-mdio-mii:02 not found
[   27.076035] libphy: PHY orion-mdio-mii:03 not found
[   27.080936] libphy: PHY orion-mdio-mii:04 not found
[   27.085833] libphy: PHY orion-mdio-mii:05 not found
[   27.090732] libphy: PHY orion-mdio-mii:06 not found
[   27.095631] libphy: PHY orion-mdio-mii:07 not found
[   27.100536] libphy: PHY orion-mdio-mii:08 not found
[   27.105438] libphy: PHY orion-mdio-mii:09 not found
[   27.110336] libphy: PHY orion-mdio-mii:0a not found
[   27.115235] libphy: PHY orion-mdio-mii:0b not found
[   27.120133] libphy: PHY orion-mdio-mii:0c not found
[   27.125033] libphy: PHY orion-mdio-mii:0d not found
[   27.129931] libphy: PHY orion-mdio-mii:0e not found
[   27.134830] libphy: PHY orion-mdio-mii:0f not found
[   27.139728] libphy: PHY orion-mdio-mii:10 not found
[   27.144628] libphy: PHY orion-mdio-mii:11 not found
[   27.149527] libphy: PHY orion-mdio-mii:12 not found
[   27.154425] libphy: PHY orion-mdio-mii:13 not found
[   27.159325] libphy: PHY orion-mdio-mii:14 not found
[   27.164223] libphy: PHY orion-mdio-mii:15 not found
[   27.169124] libphy: PHY orion-mdio-mii:16 not found
[   27.174020] libphy: PHY orion-mdio-mii:17 not found
[   27.178920] libphy: PHY orion-mdio-mii:18 not found
[   27.183819] libphy: PHY orion-mdio-mii:19 not found
[   27.188718] libphy: PHY orion-mdio-mii:1a not found
[   27.193618] libphy: PHY orion-mdio-mii:1b not found
[   27.198516] libphy: PHY orion-mdio-mii:1c not found
[   27.203415] libphy: PHY orion-mdio-mii:1d not found
[   27.208314] libphy: PHY orion-mdio-mii:1e not found
[   27.213214] libphy: PHY orion-mdio-mii:1f not found
[   27.449117] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   27.486640] usbcore: registered new interface driver usbfs
[   27.497326] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   27.536329] usbcore: registered new interface driver hub
[   27.578228] usbcore: registered new device driver usb
[   27.627655] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   27.695581] ehci-orion: EHCI orion driver
[   28.636610] libphy: orion_mdio_bus: probed
[   28.665173] physmap platform flash device: 00040000 at f4000000
[   28.680178] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:16:01:a5:a7:d6
[   29.593301] raid6: int32x1  gen()    31 MB/s
[   29.665016] raid6: int32x1  xor()    38 MB/s
[   29.738047] raid6: int32x2  gen()    48 MB/s
[   29.809263] raid6: int32x2  xor()    54 MB/s
[   29.881292] raid6: int32x4  gen()    55 MB/s
[   29.952959] raid6: int32x4  xor()    47 MB/s
[   30.025554] raid6: int32x8  gen()    59 MB/s
[   30.097576] raid6: int32x8  xor()    44 MB/s
[   30.101892] raid6: using algorithm int32x8 gen() 59 MB/s
[   30.107225] raid6: .... xor() 44 MB/s, rmw enabled
[   30.112033] raid6: using intx1 recovery algorithm
[   30.134079] Found: SST 39LF020
[   30.141009] physmap-flash.0: Found 1 x8 devices at 0x0 in 8-bit bank
[   30.266496] number of JEDEC chips: 1
[   30.439685] orion-ehci orion-ehci.0: EHCI Host Controller
[   30.481543] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   30.525549] orion-ehci orion-ehci.0: irq 18, io mem 0xf1050000
[   30.568985] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   30.589379] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   30.596206] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   30.603452] usb usb1: Product: EHCI Host Controller
[   30.608360] usb usb1: Manufacturer: Linux 4.12.13 ehci_hcd
[   30.613872] usb usb1: SerialNumber: orion-ehci.0
[   30.688510] hub 1-0:1.0: USB hub found
[   30.705242] hub 1-0:1.0: 1 port detected
[   30.928747] xor: measuring software checksum speed
[   30.972862]    arm4regs  :   427.000 MB/sec
[   31.016860]    8regs     :   351.000 MB/sec
[   31.060865]    32regs    :   427.000 MB/sec
[   31.065069] xor: using function: 32regs (427.000 MB/sec)
[   31.196988] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   31.361468] usb 1-1: New USB device found, idVendor=0409, idProduct=005a
[   31.368209] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   31.404102] Btrfs loaded, crc32c=crc32c-generic
[   31.417241] hub 1-1:1.0: USB hub found
[   31.440956] hub 1-1:1.0: 4 ports detected
[   31.454988] BTRFS: device fsid 7e08214e-3da1-4d58-9858-b8fa09098465 devid 1 transid 103 /dev/sda4
[   31.757186] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   31.882721] usb 1-1.2: New USB device found, idVendor=0781, idProduct=5567
[   31.889641] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   31.896995] usb 1-1.2: Product: Cruzer Blade
[   31.901291] usb 1-1.2: Manufacturer: SanDisk
[   31.905593] usb 1-1.2: SerialNumber: 4C530003050719115581
[   32.041346] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   32.065121] scsi host4: usb-storage 1-1.2:1.0
[   32.079952] usbcore: registered new interface driver usb-storage
[   32.113020] usbcore: registered new interface driver uas
[   32.477644] Adding 1048572k swap on /dev/sda2.  Priority:-1 extents:1 across:1048572k FS
[   33.077960] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.00 PQ: 0 ANSI: 6
[   33.131548] sd 4:0:0:0: [sdc] 30464000 512-byte logical blocks: (15.6 GB/14.5 GiB)
[   33.139742] sd 4:0:0:0: Attached scsi generic sg2 type 0
[   33.189558] sd 4:0:0:0: [sdc] Write Protect is off
[   33.194443] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[   33.224341] sd 4:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   33.318478]  sdc: sdc1
[   33.351550] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[   33.401833] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   33.493566] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   34.190015] BTRFS: device fsid 9463905b-cd2c-47da-947e-b843f3410d75 devid 1 transid 17 /dev/sdc1
[   34.947238] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[   34.960940] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.103950] NET: Registered protocol family 17
[   38.474648] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control enabled
[   38.484507] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 
Old 12-28-2020, 08:26 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you can find some info here: https://wiki.debian.org/Initrd and here: https://wiki.debian.org/initramfs
 
Old 12-28-2020, 08:44 AM   #4
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the links.
On this page I found instructions for packing and unpacking of initrd files:
https://kernel-team.pages.debian.net...initramfs.html

It does not work for my file:
Code:
cat /boot/initrd.buffalo | cpio -i
cpio: Malformed number MN�N/�9
cpio: Malformed number N�N/�9�
cpio: Malformed number N�N/�9��
cpio: Malformed number �N/�9���
cpio: Malformed number N/�9����
cpio: Malformed number /�9���ԧ
cpio: Malformed number �9���ԧE
cpio: Malformed number 9���ԧE
cpio: Malformed number ���ԧE�
cpio: Malformed number ��ԧEƦ
cpio: Malformed number �ԧEƦ�
cpio: Malformed number ԧEƦ��
cpio: Malformed number �EƦ��D
cpio: Malformed number EƦ��D�
cpio: Malformed number Ʀ��D�1
cpio: Malformed number Ʀ��D�1�
Code:
# lsinitramfs /boot/initrd.buffalo 
cpio: premature end of archive
I was able to unpack /boot/initrd.buffalo like this, but i was unable to pack it again:
Code:
# tail -c+65 < /boot/initrd.buffalo > out
# pax -z -r < out 
# ls -l
# ls -l
total 6440
lrwxrwxrwx 1 root root       7 Dec  9 11:30 bin -> usr/bin
drwxr-xr-x 9 root root    4096 Dec 28 05:42 boot-temp
drwxr-xr-x 3 root root    4096 Dec  9 11:30 conf
drwxr-xr-x 5 root root    4096 Dec  9 11:31 etc
-rwxr-xr-x 1 root root    6338 Aug 22  2019 init
lrwxrwxrwx 1 root root       7 Dec  9 11:30 lib -> usr/lib
-rw-r--r-- 1 root root 6550969 Dec 28 09:43 out
drwxr-xr-x 2 root root    4096 Dec  9 11:30 run
lrwxrwxrwx 1 root root       8 Dec  9 11:30 sbin -> usr/sbin
drwxr-xr-x 5 root root    4096 Dec  9 11:30 scripts
drwxr-xr-x 2 root root    4096 Dec  9 09:39 sdb1
drwxr-xr-x 2 root root    4096 Dec  9 09:39 sdb3
drwxr-xr-x 5 root root    4096 Dec  9 11:30 usr
 
Old 12-28-2020, 09:20 AM   #5
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
I've adjusted /etc/initramfs-tools/conf.d/modules, updated the system, and reinstalled the kernel. Now the system does not boot anymore:
Code:
TFTP MODE  E06
Lost boot image
in detail:
Code:
# 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
Next I've updated my system:
Code:
# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Hit:2 http://http.us.debian.org/debian buster InRelease                                                            
Get:3 http://http.us.debian.org/debian buster-updates InRelease [51.9 kB]                      
Get:4 https://raw.githubusercontent.com/1000001101000/Debian_on_Buffalo/master/PPA buster InRelease [1,651 B]
Get:5 http://security.debian.org/debian-security buster/updates/main Sources [159 kB]
Get:6 http://security.debian.org/debian-security buster/updates/main armel Packages [232 kB]
Get:7 http://security.debian.org/debian-security buster/updates/main Translation-en [141 kB]
Get:8 http://http.us.debian.org/debian buster-updates/main Sources.diff/Index [4,672 B]                            
Get:9 http://http.us.debian.org/debian buster-updates/main armel Packages.diff/Index [4,672 B]                     
Get:10 http://http.us.debian.org/debian buster-updates/main Sources 2020-12-24-1401.30.pdiff [415 B]               
Get:10 http://http.us.debian.org/debian buster-updates/main Sources 2020-12-24-1401.30.pdiff [415 B]               
Get:11 http://http.us.debian.org/debian buster-updates/main armel Packages 2020-12-24-1401.30.pdiff [286 B]        
Get:11 http://http.us.debian.org/debian buster-updates/main armel Packages 2020-12-24-1401.30.pdiff [286 B]        
Fetched 661 kB in 12s (56.8 kB/s)                                                                                  
Reading package lists... Done

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apt apt-transport-https apt-utils libapt-inst2.0 libapt-pkg5.0 python-apt-common python3-apt tzdata
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,489 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://security.debian.org/debian-security buster/updates/main armel libapt-pkg5.0 armel 1.8.2.2 [855 kB]
Get:2 http://http.us.debian.org/debian buster-updates/main armel tzdata all 2020e-0+deb10u1 [266 kB]
Get:3 http://security.debian.org/debian-security buster/updates/main armel libapt-inst2.0 armel 1.8.2.2 [200 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main armel apt armel 1.8.2.2 [1,354 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main armel apt-utils armel 1.8.2.2 [402 kB]
Get:6 http://security.debian.org/debian-security buster/updates/main armel apt-transport-https all 1.8.2.2 [149 kB]
Get:7 http://security.debian.org/debian-security buster/updates/main armel python-apt-common all 1.8.4.3 [96.3 kB]
Get:8 http://security.debian.org/debian-security buster/updates/main armel python3-apt armel 1.8.4.3 [167 kB]
Fetched 3,489 kB in 1s (2,429 kB/s)                                
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 27554 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.8.2.2_armel.deb ...
Unpacking libapt-pkg5.0:armel (1.8.2.2) over (1.8.2.1) ...
Setting up libapt-pkg5.0:armel (1.8.2.2) ...
(Reading database ... 27554 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.8.2.2_armel.deb ...
Unpacking libapt-inst2.0:armel (1.8.2.2) over (1.8.2.1) ...
Preparing to unpack .../archives/apt_1.8.2.2_armel.deb ...
Unpacking apt (1.8.2.2) over (1.8.2.1) ...
Setting up apt (1.8.2.2) ...
(Reading database ... 27554 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.8.2.2_armel.deb ...
Unpacking apt-utils (1.8.2.2) over (1.8.2.1) ...
Preparing to unpack .../tzdata_2020e-0+deb10u1_all.deb ...
Unpacking tzdata (2020e-0+deb10u1) over (2020d-0+deb10u1) ...
Preparing to unpack .../apt-transport-https_1.8.2.2_all.deb ...
Unpacking apt-transport-https (1.8.2.2) over (1.8.2.1) ...
Preparing to unpack .../python-apt-common_1.8.4.3_all.deb ...
Unpacking python-apt-common (1.8.4.3) over (1.8.4.1) ...
Preparing to unpack .../python3-apt_1.8.4.3_armel.deb ...
Unpacking python3-apt (1.8.4.3) over (1.8.4.1) ...
Setting up apt-transport-https (1.8.2.2) ...
Setting up libapt-inst2.0:armel (1.8.2.2) ...
Setting up tzdata (2020e-0+deb10u1) ...

Current default time zone: 'America/New_York'
Local time is now:      Mon Dec 28 09:51:12 EST 2020.
Universal Time is now:  Mon Dec 28 14:51:12 UTC 2020.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up python-apt-common (1.8.4.3) ...
Setting up apt-utils (1.8.2.2) ...
Setting up python3-apt (1.8.4.3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for ntp (1:4.2.8p12+dfsg-4) ...
Processing triggers for libc-bin (2.28-10) ...
Finally I've re-installed the kernel (and by extension regenerated uImage.buffalo and initrd.buffalo)
Code:
# 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.
I notice initrd.buffalo is now way bigger:
Code:
# 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
 
Old 12-28-2020, 09:45 AM   #6
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
I've reverted initrd.buffalo. The system now boots ok. I conclude the other changes to the system were not the problem.

Initrd:
Code:
# file initrd.buffalo
    initrd.buffalo: u-boot legacy uImage, ramdisk 4.12.13, Linux/ARM, RAMDisk Image (Not compressed), 15327782 bytes, Mon Dec 28 15:07:50 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0x730B771C, Data CRC: 0x7B7484E3

# 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
uImage:
Code:
# file uImage.buffalo
    uImage.buffalo: u-boot legacy uImage, kernel 4.12.13, Linux/ARM, OS Kernel Image (Not compressed), 2055608 bytes, Mon Dec 28 15:07:49 2020, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0x43625079, Data CRC: 0x913E9D2F
# file uImage.buffalo.bak 
uImage.buffalo.bak: 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  uImage.buffalo 
Image Name:   kernel 4.12.13
Created:      Mon Dec 28 16:07:49 2020
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2055608 Bytes = 2007.43 KiB = 1.96 MiB
Load Address: 00008000
Entry Point:  00008000

# mkimage -l  uImage.buffalo.bak 
Image Name:   kernel 4.12.13
Created:      Wed Dec  9 17: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
Revert of the file:
Code:
# ls
config-4.12.13	initrd.buffalo	    initrd.img-4.12.13	System.map-4.12.13  uImage.buffalo.bak
hidden		initrd.buffalo.bak  lost+found		uImage.buffalo	    vmlinuz-4.12.13
# mv initrd.buffalo initrd.buffalo-no-boot
# mv initrd.buffalo.bak initrd.buffalo
 
Old 12-28-2020, 10:01 AM   #7
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
This page states a filesize limit of 7MB for the initrd. I don't know yet what is causing this limit.
https://github.com/1000001101000/Deb...falo/issues/67
 
Old 12-30-2020, 03:32 AM   #8
firenze465
Member
 
Registered: Oct 2017
Posts: 42

Rep: Reputation: Disabled
Quote:
Originally Posted by cedric! View Post
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.
I think there are 2 issues here - but I may be wrong.

1. You have an issue with Debian 10 installed on your Buffalo NAS desktop computer with a 1TB hard disk drive.

2. You want to install Debian 10 on a usb.

Have I got this right? Sorry if my question is elementary.
 
Old 01-18-2021, 11:51 AM   #9
cedric!
LQ Newbie
 
Registered: Dec 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by firenze465 View Post
I think there are 2 issues here - but I may be wrong.

1. You have an issue with Debian 10 installed on your Buffalo NAS desktop computer with a 1TB hard disk drive.

2. You want to install Debian 10 on a usb.

Have I got this right? Sorry if my question is elementary.
Thank you for your reaction. I have solved the problem. It turns out I needed to add usb drivers to the initrd. This process is described in more detail here: https://github.com/1000001101000/Deb...falo/issues/72

To answer your questions:

1. Almost. The Buffalo Terrastation Pro TS-HTGL/R5 TS-H4.0TGL/R5 BUF-TS-HTGLR5(A) is not a desktop computer. This is a embedded system with an arm processor, and 4 sata ports. Therefore the mechanism for booting is very different compared to a standard PC. It does have 2 1TB hard drives though.

2. I do want to install Debian 10 to a memory stick, but the Buffalo Terrastation has to boot from it. This is not possible, but it is possible to use the memory stick as the root file system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying ISO to thumb drive using 'dd' causes thumb drive to be read-only? ahc_fan Linux - General 8 01-15-2019 08:10 AM
dd to copy a thumb drive which I am live booted on to another thumb drive DrinkinHomeBrew Linux - Newbie 3 01-26-2015 04:52 PM
copied Debian install from dead hdd to new hdd.now system fails to boot :S deepclutch Debian 18 02-15-2008 07:17 AM
Buffalo Terrastation disinformation Linux - Newbie 1 11-25-2005 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration