Thecus Recovery Links

Aus CaiaWiki

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Hinzufügen einer seriellen Schnittstelle

Siehe N2100 Recovering from a bad config change

Hinzufügen einer seriellen Schnittstelle

Thecus Hacking Allgemein

DIET-PC on an ARM-based Thecus NAS

Bootup Meldungen

Zunächst ein Terminal mit /dev/ttyS0 verbinden:

cu -l /dev/ttyS0 -s 115200

Der Thecus liefert nach dem Einschalten folgende Bootmeldungen:

Connected.
+RST=No
Transfer to factory test Mode : No
Reset default set:Normal
Thecus: Found PCI device Vendor ID=0x000010EC
Vendor    0x10ec
Device    0x8169
 Allocate cyg_pci_io_base=0x90000100
 Allocate cyg_pci_memory_base=0x40000100
Thecus: Found PCI device Vendor ID=0x000010EC
Vendor    0x10ec
Device    0x8169
 Allocate cyg_pci_io_base=0x90000200
 Allocate cyg_pci_memory_base=0x40000200
Thecus: Found PCI device Vendor ID=0x00001095
Vendor    0x1095
Device    0x3512
 Allocate cyg_pci_io_base=0x90000208
 Allocate cyg_pci_io_base=0x9000020c
 Allocate cyg_pci_io_base=0x90000218
 Allocate cyg_pci_io_base=0x9000021c
 Allocate cyg_pci_io_base=0x90000230
 Allocate cyg_pci_memory_base=0x40000400
Thecus: Found PCI device Vendor ID=0x00001106
Thecus: Found PCI device Vendor ID=0x00001106
Thecus: Found PCI device Vendor ID=0x00001106
Vendor    0x1106
Device    0x3104
 Allocate cyg_pci_memory_base=0x40000500
 PCI: device already configured
 rtl-eth0: RTL8169s/8110s Gigabit Ethernet driver 2.2 at 0xb0000000, 00:14:fd:30:21:d8
rtl-eth0: Auto-negotiation Enabled.
rtl-eth0: 100Mbps Full-duplex operation.
PCI: device already configured
eth1 found: bus[0] dev[2] base[b0000100]
rtl-eth1: RTL8169s/8110s Gigabit Ethernet driver 2.2 at 0xb0000100, 00:14:fd:30:21:d9
Ethernet rtl-eth0: MAC address 00:14:fd:30:21:d8
IP: 192.168.1.100/255.255.255.0, Gateway: 0.0.0.0
Default server: 0.0.0.0, DNS server IP: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Red Hat certified release, version 1.93 - built 17:25:00, Feb  6 2007

Platform: THECUS N2100 (IOP80219) 
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x20000000, 0x0004b890-0x1ffd1000 available, total: 512 MB
FLASH: 0xf0000000 - 0xf1000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 3.000 seconds - enter ^C to abort
RedBoot> thecus_setip
RedBoot> fis load ramdisk
RedBoot> fis load kernel
RedBoot> exec -c "console=ttyS0,115200 root=/dev/ram0 initrd=0xa0800000,42M mem=512M@0xa0000000"
Build ATAG
ATAG_MEM: Overwrite ram_end with real_region_top=0x20000000, memsize=512 M
ATAG_MEM=536870912@0xa0000000, MACH_TYPE=1101
Using base address 0x00200000 and length 0x00160000
Uncompressing Linux............................................................................................. done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.26-1-iop32x (Debian 2.6.26-13dma1) (tbm@cyrius.com) (gcc version 4.1.3 20080420 (prerelease) (Debian 4.1.2-22)) #1 Sun Jan 11 10:42:50 UTC 2009
[    0.000000] CPU: XScale-80219 [69052e30] revision 0 (ARMv5TE), cr=0000397f
[    0.000000] Machine: Thecus N2100
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] CPU0: D VIVT undefined 5 cache
[    0.000000] CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
[    0.000000] CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/ram0 initrd=0xa0800000,42M mem=512M@0xa0000000
[    0.000000] PID hash table entries: 2048 (order: 11, 8192 bytes)
[42949372.960000] Console: colour dummy device 80x30
[42949372.960000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[42949372.960000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[42949373.010000] Memory: 512MB = 512MB total
[42949373.010000] Memory: 473600KB available (2636K code, 286K data, 112K init)
[42949373.240000] Security Framework initialized
[42949373.240000] SELinux:  Disabled at boot.
[42949373.240000] Capability LSM initialized
[42949373.240000] Mount-cache hash table entries: 512
[42949373.240000] Initializing cgroup subsys ns
[42949373.240000] Initializing cgroup subsys cpuacct
[42949373.240000] Initializing cgroup subsys devices
[42949373.240000] CPU: Testing write buffer coherency: ok
[42949373.240000] net_namespace: 652 bytes
[42949373.240000] NET: Registered protocol family 16
[42949373.250000] PCI: bus0: Fast back to back transfers disabled
[42949373.290000] NET: Registered protocol family 2
[42949373.380000] IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
[42949373.380000] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[42949373.380000] TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
[42949373.380000] TCP: Hash tables configured (established 65536 bind 65536)
[42949373.380000] TCP reno registered
[42949373.410000] NET: Registered protocol family 1
[42949373.410000] checking if image is initramfs... it is
[42949381.840000] Freeing initrd memory: 43008K
[42949381.840000] NetWinder Floating Point Emulator V0.97 (double precision)
[42949381.840000] audit: initializing netlink socket (disabled)
[42949381.840000] type=2000 audit(8.880:1): initialized
[42949381.840000] VFS: Disk quotas dquot_6.5.1
[42949381.840000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[42949381.840000] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[42949381.840000] msgmni has been set to 1009
[42949381.840000] async_tx: api initialized (async)
[42949381.840000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[42949381.840000] io scheduler noop registered
[42949381.840000] io scheduler anticipatory registered
[42949381.840000] io scheduler deadline registered
[42949381.840000] io scheduler cfq registered (default)
[42949381.890000] Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
[42949381.890000] serial8250.0: ttyS0 at MMIO 0xfe800000 (irq = 0) is a 16550A
[42949381.890000] console [ttyS0] enabled
[42949382.210000] brd: module loaded
[42949382.220000] physmap platform flash device: 01000000 at f0000000
[42949382.220000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
[42949382.230000]  Intel/Sharp Extended Query Table at 0x0031
[42949382.240000] Using buffer write method
[42949382.240000] cfi_cmdset_0001: Erase suspend on write enabled
[42949382.250000] Searching for RedBoot partition table in physmap-flash.0 at offset 0xfe0000
[42949382.570000] 6 RedBoot partitions found on MTD device physmap-flash.0
[42949382.580000] Creating 6 MTD partitions on "physmap-flash.0":
[42949382.590000] 0x00000000-0x00040000 : "RedBoot"
[42949382.590000] 0x00040000-0x00d40000 : "ramdisk"
[42949382.600000] 0x00d40000-0x00ea0000 : "kernel"
[42949382.610000] 0x00ea0000-0x00fc0000 : "user"
[42949382.610000] 0x00fc0000-0x00fc1000 : "RedBoot config"
[42949382.620000] mtd: partition "RedBoot config" doesn't end on an erase block -- force read-only
[42949382.630000] 0x00fe0000-0x01000000 : "FIS directory"
[42949382.640000] mice: PS/2 mouse device common for all mice
[42949382.650000] i2c /dev entries driver
[42949382.660000] rtc-rs5c372 0-0032: rs5c372b found, 24hr, driver version 0.5
[42949382.670000] rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
[42949382.680000] pca9532 0-0060: setting platform data
[42949382.690000] Registered led device: n2100:red:satafail0
[42949382.690000] Registered led device: n2100:red:satafail1
[42949382.700000] Registered led device: n2100:blue:usb
[42949382.710000] Registered led device: n2100:red:usb
[42949382.710000] Registered led device: n2100:orange:system
[42949382.720000] Registered led device: n2100:red:system
[42949382.730000] input: N2100 beeper as /class/input/input0
[42949382.790000] iop-adma iop-adma.0: Intel(R) IOP: ( cpy intr )
[42949382.810000] iop-adma iop-adma.1: Intel(R) IOP: ( cpy intr )
[42949382.810000] NET: Registered protocol family 26
[42949382.820000] TCP cubic registered
[42949382.820000] NET: Registered protocol family 17
[42949382.830000] XScale DSP coprocessor detected.
[42949382.830000] registered taskstats version 1
[42949382.840000] rtc-rs5c372 0-0032: setting system clock to 2009-10-04 14:13:16 UTC (1254665596)
[42949382.850000] Freeing init memory: 112K
Loading, please wait...
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... [42949389.600000] r8169 Gigabit Ethernet2LK-NAPI loaded
[42949389.610000] eth0: RTL8169sb/8110sb at 0xe0870200, 00:14:fd:30:21:d8, XID 10000000 IRQ 27
[42949389.620000] r8169 Gigabit Ethernet driver 2.2LK-NAPI loaded
[42949389.620000] eth1: RTL8169sb/8110sb at 0xe0872300, 00:14:fd:30:21:d9, XID 10000000 IRQ 30
[42949389.810000] usbcore: registered new interface driver usbfs
[42949389.820000] usbcore: registered new interface driver hub
[42949390.020000] SCSI subsystem initialized
[42949390.120000] usbcore: registered new device driver usb
[42949390.140000] USB Universal Host Controller Interface driver v3.0
[42949390.140000] uhci_hcd 0000:00:04.0: UHCI Host Controller
[42949390.150000] uhci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 1
[42949390.160000] uhci_hcd 0000:00:04.0: irq 28, io base 0x90000800
[42949390.160000] usb usb1: configuration #1 chosen from 1 choice
[42949390.170000] hub 1-0:1.0: USB hub found
[42949390.170000] hub 1-0:1.0: 2 ports detected
[42949390.370000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[42949390.380000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[42949390.390000] usb usb1: Product: UHCI Host Controller
[42949390.390000] usb usb1: Manufacturer: Linux 2.6.26-1-iop32x uhci_hcd
[42949390.400000] usb usb1: SerialNumber: 0000:00:04.0
[42949390.410000] uhci_hcd 0000:00:04.1: UHCI Host Controller
[42949390.420000] uhci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 2
[42949390.430000] uhci_hcd 0000:00:04.1: irq 27, io base 0x90000820
[42949390.440000] usb usb2: configuration #1 chosen from 1 choice
[42949390.440000] hub 2-0:1.0: USB hub found
[42949390.450000] hub 2-0:1.0: 2 ports detected
[42949390.560000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[42949390.560000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[42949390.570000] usb usb2: Product: UHCI Host Controller
[42949390.580000] usb usb2: Manufacturer: Linux 2.6.26-1-iop32x uhci_hcd
[42949390.580000] usb usb2: SerialNumber: 0000:00:04.1
[42949390.590000] sata_sil 0000:00:03.0: Applying R_ERR on DMA activate FIS errata fix
[42949390.610000] scsi0 : sata_sil
[42949390.620000] scsi1 : sata_sil
[42949390.620000] ata1: SATA max UDMA/100 mmio m512@0x800a0000 tf 0x800a0080 irq 29
[42949390.630000] ata2: SATA max UDMA/100 mmio m512@0x800a0000 tf 0x800a00c0 irq 29
[42949390.990000] ata1: SATA link down (SStatus 0 SControl 310)
[42949391.340000] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[42949391.400000] ata2.00: ATA-7: ST3500630AS, 3.AAK, max UDMA/133
[42949391.400000] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
[42949391.480000] ata2.00: configured for UDMA/100
[42949391.490000] scsi 1:0:0:0: Direct-Access     ATA      ST3500630AS      3.AA PQ: 0 ANSI: 5
[42949391.500000] ehci_hcd 0000:00:04.2: EHCI Host Controller
[42949391.500000] ehci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 3
[42949391.510000] ehci_hcd 0000:00:04.2: irq 29, io mem 0x800a0400
[42949391.540000] ehci_hcd 0000:00:04.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[42949391.540000] usb usb3: configuration #1 chosen from 1 choice
[42949391.550000] hub 3-0:1.0: USB hub found
[42949391.550000] hub 3-0:1.0: 4 ports detected
[42949391.670000] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[42949391.670000] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[42949391.680000] usb usb3: Product: EHCI Host Controller
[42949391.690000] usb usb3: Manufacturer: Linux 2.6.26-1-iop32x ehci_hcd
[42949391.690000] usb usb3: SerialNumber: 0000:00:04.2
[42949391.940000] Driver 'sd' needs updating - please use bus_type methods
[42949392.010000] sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
[42949392.010000] sd 1:0:0:0: [sda] Write Protect is off
[42949392.020000] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[42949392.040000] sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
[42949392.050000] sd 1:0:0:0: [sda] Write Protect is off
[42949392.080000] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[42949392.090000]  sda: sda1 sda2 sda3 < sda5 >
[42949392.130000] sd 1:0:0:0: [sda] Attached SCSI disk
done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[42949393.080000] kjournald starting.  Commit interval 5 seconds
[42949393.090000] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd[42949396.940000] udevd version 125 started
.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Setting parameters of disc: (none).
Setting the system clock.
Activating swap...[42949408.110000] Adding 369452k swap on /dev/sda5.  Priority:-1 extents:1 across:369452k
done.
[42949408.220000] EXT3 FS on sda2, internal journal
Setting the system clock.
Cleaning up ifupdown....
Loading kernel modules...[42949410.230000] loop: module loaded
done.
Loading device-mapper support[42949410.830000] device-mapper: uevent: version 1.0.3
[42949410.840000] device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
.
Checking file systems...fsck 1.41.3 (12-Oct-2008)
fsck.ext3: No such file or directory while trying to open /dev/sdb1
/dev/sdb1: 
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

/dev/sda1: clean, 24/24096 files, 24151/96356 blocks
fsck died with exit status 8
failed (code 8).
File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. failed!
A maintenance shell will now be started. CONTROL-D will terminate this shell and resume system boot. (warning).
Give root password for maintenance
(or type Control-D to continue):

Recovery nach gescheitertem Kernel Update

Nach einem fehlgeschlagenen Kernel-Update wechselte der Thecus nach einem Neustart nur noch in eine initramfs Konsole.

Um ein neues initramfs zu erzeugen, hier die notwendigen Schritte:

Achtung: root-Partition auf /dev/sdb2, boot-Partition auf /dev/sdb1 - Dies ist auf das jeweilige System anzupassen!

  • Mounten der Root-Platte:
(initramfs) mount -t ext3 /dev/sdb2 /root
(initramfs) cd /root
  • Root-Directory ändern:
(initramfs) chroot /root
  • Mounten der Boot-Partition sowie der notwendigen proc- und sysfs-Dateisysteme
(initramfs) mount -t ext3 /dev/sdb1 /boot
(initramfs) mount -t proc proc /proc
(initramfs) mount -t sysfs none /sys
  • Neustart von udev:
(initramfs) /etc/init.d/udev stop
(initramfs) /etc/init.d/udev start
  • Überprüfen der /etc/fstab:
Hier als backup meine version
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       						<dump>  <pass>
proc 		/proc		proc 	defaults							0 	0
/dev/sdb2	/		ext3	defaults,noatime,nodiratime,commit=60000,errors=remount-ro	0 	0
/dev/sdb1	/boot		ext3	defaults,noatime,nodiratime,commit=30000			0 	2
/dev/sdb5	none		swap	sw								0	0

#Data
/dev/sda1 	/Data 		ext3 	rw,noatime,nodiratime,commit=60000,errors=remount-ro 		0 	0
  • Löschen und erzeugen eines neuen initramfs:
(initramfs) cd /usr/sbin
(initramfs) update-initramfs -v -d -k 2.6.26-1-iop32x
(initramfs) update-initramfs -v -c -k 2.6.26-1-iop32x -b /boot
  • Neues initramfs flashen:
(initramfs) /usr/sbin/flash-kernel
Persönliche Werkzeuge