Author Archives: norbert

Easy2Boot and “\_ISO\e2b\grub\E2B.cfg is MISSING!”

3
Filed under Linux
Tagged as ,

This post is for Steve Si regarding the “E2B.cfg is MISSING” error with Easy2Boot.

I have four identical hard drives which have been removed from a QNAP NAS. I hooked them up on a PC and tried booting into Knoppix with E2B in order to access the four drives. This resulted in the above error. Easy2Boot v1.80 was installed on the USB stick.

After pressing Enter, an unreadable line appears at the top of the screen (some strange white pixels – see screenshots at the end).

Booting into Knoppix from DVD works. The four drives form a Raid 5 volume. Once Knoppix is booted (from DVD), the raid volume can be attached with mdadm –assemble –scan just fine.

Just as Steve said, the problem has something to do with the hard drives (or their partitions). E2B boots fine from USB after detaching all four SATA cables. The PC has four SATA ports. I tried connecting them in different order and realized that only one of the four drives is causing this error. I don’t know why only this disk. All four should be the same since they are from the same raid array.

The drives were physically labeled 1 to 4 with a felt pen. The drive which causes the problem is called drive 3.

UPDATE 2016-07-12:

The drive has four partitions. In order to make the problem reproducible for others, I created an image of the whole drive. Since the drive is really large (1TB) I filled most of the partitions with zeros. Except the first 64KB and the raid superblock at the end of each partition. That way, the drive is almost empty and compresses down to about 1MB. I verified that the image with the deleted parts is still causing the error by writing back the image to a different disk. Now the other disk is also causing the problem.

Here is the link to the compressed image: backup.img.bz2

The image can be written back to a physical disk like this:

bzip2 -c -d backup.img.bz2 | dd of=/dev/sda bs=64K

NOTE: On my first try, I filled all of the partitions except the raid superblocks with zeros. This image did not cause the problem. So on a hunch I left the first 64KB of each partition. So whatever is causing the problem, has to do with some data at the beginning of one ore more partitions.

UPDATE 2016-07-13:

I did some further experiments. Firstly, the raid superblock had no influence. The problem persisted even after overwriting them all with zeros. Then I removed partitions one by one from the partition table. That lead to the fact that only the third partition caused the problem. The third partition is unfortunately the largest partition with about 930GB. So I created a new disk with a single small partition which contained only the troublesome beginning 64KB of the former third partition. Here I found out that the problem goes away when the partition is too small. I don’t know the size limit though. The problem was showing up again, once I set the size if the partition to nearly 1TB again.

I was now even able to reproduce the whole thing inside a VirtualBox VM. I created a sparse vdi of about 1TB. Since it’s almost empty though, it only uses a couple MB on the host machine. Once E2B is booted with Virtual Machine USB Boot inside VirtualBox, the error message appears.

Here is a copy of the virtual machine: E2BTest_VBox.zip

And here are the MBR and the first 64KB of the partition (the drive in the VM already contains a disk with that data):

MBR: mbr_v4.bin
First 64K of partition: part_start.bin

UPDATE 2016-08-12:

Steve reported that the bug in grub4dos has been fixed. And I can confirm, the problem is gone in the latest version of Easy2Boot

Hexdump of the first few bytes of each drive

Drive 3: This is the drive which causes the error:

00000000  fa b8 00 10 8e d0 bc 00  b0 b8 00 00 8e d8 8e c0  |................|
00000010  fb be 00 7c bf 00 06 b9  00 02 f3 a4 ea 21 06 00  |...|.........!..|
00000020  00 be be 07 38 04 75 0b  83 c6 10 81 fe fe 07 75  |....8.u........u|
00000030  f3 eb 16 b4 02 b0 01 bb  00 7c b2 80 8a 74 01 8b  |.........|...t..|
00000040  4c 02 cd 13 ea 00 7c 00  00 eb fe 00 00 00 00 00  |L.....|.........|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  5b ba 0e 00 00 00 00 00  |........[.......|
000001c0  29 00 83 fe 3f 41 28 00  00 00 9a 2d 10 00 00 00  |)...?A(....-....|
000001d0  07 42 83 fe 3f 83 c8 2d  10 00 bc 2d 10 00 00 00  |.B..?..-...-....|
000001e0  05 84 83 fe ff ff 88 5b  20 00 ba 8c 40 74 00 fe  |.......[ ...@t..|
000001f0  ff ff 83 fe ff ff 48 e8  60 74 b8 32 0f 00 55 aa  |......H.`t.2..U.|
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005000  6d 64 61 64 6d 3a 20 61  64 64 65 64 20 2f 64 65  |mdadm: added /de|
00005010  76 2f 73 64 64 31 0a 00  00 00 00 00 00 00 00 00  |v/sdd1..........|
00005020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005400  b0 81 00 00 a0 05 02 00  00 00 00 00 f8 88 01 00  |................|
00005410  9f 80 00 00 00 00 00 00  02 00 00 00 02 00 00 00  |................|
00005420  00 80 00 00 00 80 00 00  f0 19 00 00 0a 80 60 57  |..............`W|
00005430  0a 80 60 57 07 00 27 00  53 ef 01 00 01 00 00 00  |..`W..'.S.......|
00005440  49 25 60 57 00 4e ed 00  00 00 00 00 01 00 00 00  |I%`W.N..........|
00005450  00 00 00 00 0b 00 00 00  00 01 00 00 3c 00 00 00  |............<...|
00005460  02 00 00 00 03 00 00 00  49 45 de 80 4d 66 49 95  |........IE..MfI.|
00005470  ac 04 25 bf 75 23 63 e7  00 00 00 00 00 00 00 00  |..%.u#c.........|
00005480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

Drive 1:

00000000  fa b8 00 10 8e d0 bc 00  b0 b8 00 00 8e d8 8e c0  |................|
00000010  fb be 00 7c bf 00 06 b9  00 02 f3 a4 ea 21 06 00  |...|.........!..|
00000020  00 be be 07 38 04 75 0b  83 c6 10 81 fe fe 07 75  |....8.u........u|
00000030  f3 eb 16 b4 02 b0 01 bb  00 7c b2 80 8a 74 01 8b  |.........|...t..|
00000040  4c 02 cd 13 ea 00 7c 00  00 eb fe 00 00 00 00 00  |L.....|.........|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  1c 9a 08 00 00 00 00 00  |................|
000001c0  29 00 83 fe 3f 41 28 00  00 00 9a 2d 10 00 00 00  |)...?A(....-....|
000001d0  07 42 83 fe 3f 83 c8 2d  10 00 bc 2d 10 00 00 00  |.B..?..-...-....|
000001e0  05 84 83 fe ff ff 88 5b  20 00 ba 8c 40 74 00 fe  |.......[ ...@t..|
000001f0  ff ff 83 fe ff ff 48 e8  60 74 b8 32 0f 00 55 aa  |......H.`t.2..U.|
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005000  6d 64 61 64 6d 3a 20 61  64 64 65 64 20 2f 64 65  |mdadm: added /de|
00005010  76 2f 73 64 64 31 0a 00  00 00 00 00 00 00 00 00  |v/sdd1..........|
00005020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005400  b0 81 00 00 a0 05 02 00  00 00 00 00 f8 88 01 00  |................|
00005410  9f 80 00 00 00 00 00 00  02 00 00 00 02 00 00 00  |................|
00005420  00 80 00 00 00 80 00 00  f0 19 00 00 b7 fb 66 57  |..............fW|
00005430  b7 fb 66 57 0b 00 27 00  53 ef 01 00 01 00 00 00  |..fW..'.S.......|
00005440  49 25 60 57 00 4e ed 00  00 00 00 00 01 00 00 00  |I%`W.N..........|
00005450  00 00 00 00 0b 00 00 00  00 01 00 00 3c 00 00 00  |............<...|
00005460  02 00 00 00 03 00 00 00  49 45 de 80 4d 66 49 95  |........IE..MfI.|
00005470  ac 04 25 bf 75 23 63 e7  00 00 00 00 00 00 00 00  |..%.u#c.........|
00005480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

Drive 2:

00000000  fa b8 00 10 8e d0 bc 00  b0 b8 00 00 8e d8 8e c0  |................|
00000010  fb be 00 7c bf 00 06 b9  00 02 f3 a4 ea 21 06 00  |...|.........!..|
00000020  00 be be 07 38 04 75 0b  83 c6 10 81 fe fe 07 75  |....8.u........u|
00000030  f3 eb 16 b4 02 b0 01 bb  00 7c b2 80 8a 74 01 8b  |.........|...t..|
00000040  4c 02 cd 13 ea 00 7c 00  00 eb fe 00 00 00 00 00  |L.....|.........|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  74 6a 00 00 00 00 00 00  |........tj......|
000001c0  29 00 83 fe 3f 41 28 00  00 00 9a 2d 10 00 00 00  |)...?A(....-....|
000001d0  07 42 83 fe 3f 83 c8 2d  10 00 bc 2d 10 00 00 00  |.B..?..-...-....|
000001e0  05 84 83 fe ff ff 88 5b  20 00 ba 8c 40 74 00 fe  |.......[ ...@t..|
000001f0  ff ff 83 fe ff ff 48 e8  60 74 b8 32 0f 00 55 aa  |......H.`t.2..U.|
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005000  6d 64 61 64 6d 3a 20 61  64 64 65 64 20 2f 64 65  |mdadm: added /de|
00005010  76 2f 73 64 64 31 0a 00  00 00 00 00 00 00 00 00  |v/sdd1..........|
00005020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005400  b0 81 00 00 a0 05 02 00  00 00 00 00 f8 88 01 00  |................|
00005410  9f 80 00 00 00 00 00 00  02 00 00 00 02 00 00 00  |................|
00005420  00 80 00 00 00 80 00 00  f0 19 00 00 9e f3 66 57  |..............fW|
00005430  9e f3 66 57 09 00 27 00  53 ef 01 00 01 00 00 00  |..fW..'.S.......|
00005440  49 25 60 57 00 4e ed 00  00 00 00 00 01 00 00 00  |I%`W.N..........|
00005450  00 00 00 00 0b 00 00 00  00 01 00 00 3c 00 00 00  |............<...|
00005460  02 00 00 00 03 00 00 00  49 45 de 80 4d 66 49 95  |........IE..MfI.|
00005470  ac 04 25 bf 75 23 63 e7  00 00 00 00 00 00 00 00  |..%.u#c.........|
00005480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

Drive 4:

00000000  fa b8 00 10 8e d0 bc 00  b0 b8 00 00 8e d8 8e c0  |................|
00000010  fb be 00 7c bf 00 06 b9  00 02 f3 a4 ea 21 06 00  |...|.........!..|
00000020  00 be be 07 38 04 75 0b  83 c6 10 81 fe fe 07 75  |....8.u........u|
00000030  f3 eb 16 b4 02 b0 01 bb  00 7c b2 80 8a 74 01 8b  |.........|...t..|
00000040  4c 02 cd 13 ea 00 7c 00  00 eb fe 00 00 00 00 00  |L.....|.........|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  79 32 05 00 00 00 00 00  |........y2......|
000001c0  29 00 83 fe 3f 41 28 00  00 00 9a 2d 10 00 00 00  |)...?A(....-....|
000001d0  07 42 83 fe 3f 83 c8 2d  10 00 bc 2d 10 00 00 00  |.B..?..-...-....|
000001e0  05 84 83 fe ff ff 88 5b  20 00 ba 8c 40 74 00 fe  |.......[ ...@t..|
000001f0  ff ff 83 fe ff ff 48 e8  60 74 b8 32 0f 00 55 aa  |......H.`t.2..U.|
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005000  6d 64 61 64 6d 3a 20 61  64 64 65 64 20 2f 64 65  |mdadm: added /de|
00005010  76 2f 73 64 64 31 0a 00  00 00 00 00 00 00 00 00  |v/sdd1..........|
00005020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00005400  b0 81 00 00 a0 05 02 00  00 00 00 00 f8 88 01 00  |................|
00005410  9f 80 00 00 00 00 00 00  02 00 00 00 02 00 00 00  |................|
00005420  00 80 00 00 00 80 00 00  f0 19 00 00 7a ff 66 57  |............z.fW|
00005430  7a ff 66 57 0d 00 27 00  53 ef 01 00 01 00 00 00  |z.fW..'.S.......|
00005440  49 25 60 57 00 4e ed 00  00 00 00 00 01 00 00 00  |I%`W.N..........|
00005450  00 00 00 00 0b 00 00 00  00 01 00 00 3c 00 00 00  |............<...|
00005460  02 00 00 00 03 00 00 00  49 45 de 80 4d 66 49 95  |........IE..MfI.|
00005470  ac 04 25 bf 75 23 63 e7  00 00 00 00 00 00 00 00  |..%.u#c.........|
00005480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

Information about the system

Drives: 4 x Samsung HD103UJ 1000GB SATA

lshw

root@Microknoppix:/home/knoppix# lshw -short
H/W path       Device      Class       Description
==================================================
                           system      HP Compaq dc7100 CMT(PL238ES)
/0                         bus         0968h
/0/1                       memory      128KiB BIOS
/0/5                       processor   Pentium 4
/0/5/6                     memory      28KiB L1 cache
/0/5/7                     memory      1MiB L2 cache
/0/33                      memory      System Memory
/0/33/0                    memory      512MiB DIMM DDR Synchronous 400 MHz (2.5 ns)
/0/33/1                    memory      DIMM DDR Synchronous [empty]
/0/33/2                    memory      512MiB DIMM DDR Synchronous 400 MHz (2.5 ns)
/0/33/3                    memory      DIMM DDR Synchronous [empty]
/0/34                      memory      Flash Memory
/0/34/0                    memory      512KiB Chip FLASH Non-volatile
/0/0                       memory
/0/2                       memory
/0/100                     bridge      82915G/P/GV/GL/PL/910GL Memory Controller Hub
/0/100/2                   display     82915G/GV/910GL Integrated Graphics Controller
/0/100/2.1                 display     82915G Integrated Graphics Controller
/0/100/1c                  bridge      82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1
/0/100/1c.1                bridge      82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2
/0/100/1c.1/0  eth0        network     NetXtreme BCM5751 Gigabit Ethernet PCI Express
/0/100/1d                  bus         82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1
/0/100/1d.1                bus         82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2
/0/100/1d.2                bus         82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3
/0/100/1d.3                bus         82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4
/0/100/1d.7                bus         82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
/0/100/1e                  bridge      82801 PCI Bridge
/0/100/1e.2                multimedia  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller
/0/100/1f                  bridge      82801FB/FR (ICH6/ICH6R) LPC Interface Bridge
/0/100/1f.1                storage     82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller
/0/100/1f.2                storage     82801FB/FW (ICH6/ICH6W) SATA Controller
/0/3           scsi0       storage
/0/3/0.0.0     /dev/cdrom  disk        RW/DVD GCC-4481B
/0/3/0.0.0/0   /dev/cdrom  disk
/0/4           scsi2       storage
/0/4/0.0.0     /dev/sda    disk        1TB SAMSUNG HD103UJ
/0/4/0.0.0/1   /dev/sda1   volume      517MiB EXT3 volume
/0/4/0.0.0/2   /dev/sda2   volume      517MiB Linux swap volume
/0/4/0.0.0/3   /dev/sda3   volume      2790GiB EXT4 volume
/0/4/0.0.0/4   /dev/sda4   volume      486MiB EXT3 volume
/0/4/0.1.0     /dev/sdb    disk        1TB SAMSUNG HD103UJ
/0/4/0.1.0/1   /dev/sdb1   volume      517MiB EXT3 volume
/0/4/0.1.0/2   /dev/sdb2   volume      517MiB Linux swap volume
/0/4/0.1.0/3   /dev/sdb3   volume      930GiB Linux filesystem partition
/0/4/0.1.0/4   /dev/sdb4   volume      486MiB EXT3 volume
/0/6           scsi3       storage
/0/6/0.0.0     /dev/sdc    disk        1TB SAMSUNG HD103UJ
/0/6/0.0.0/1   /dev/sdc1   volume      517MiB EXT3 volume
/0/6/0.0.0/2   /dev/sdc2   volume      517MiB Linux filesystem partition
/0/6/0.0.0/3   /dev/sdc3   volume      3046GiB EXT4 volume
/0/6/0.0.0/4   /dev/sdc4   volume      486MiB EXT3 volume
/0/6/0.1.0     /dev/sdd    disk        1TB SAMSUNG HD103UJ
/0/6/0.1.0/1   /dev/sdd1   volume      517MiB EXT3 volume
/0/6/0.1.0/2   /dev/sdd2   volume      517MiB Linux swap volume
/0/6/0.1.0/3   /dev/sdd3   volume      930GiB Linux filesystem partition
/0/6/0.1.0/4   /dev/sdd4   volume      486MiB EXT3 volume
/0/7           scsi4       storage
/0/7/0.0.0     /dev/sde    disk        15GB SCSI Disk
/0/7/0.0.0/1   /dev/sde1   volume      14GiB Windows NTFS volume
/0/7/0.0.0/2   /dev/sde2   volume      31KiB Primary partition
/0/7/0.0.0/4   /dev/sde4   volume      4061MiB Empty partition

fdisk -l (with all four drives attached)

knoppix@Microknoppix:~$ fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00089a1c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              40     1060289      530125   83  Linux
/dev/sda2         1060296     2120579      530142   83  Linux
/dev/sda3         2120584  1952507969   975193693   83  Linux
/dev/sda4      1952507976  1953503999      498012   83  Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eba5b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              40     1060289      530125   83  Linux
/dev/sdb2         1060296     2120579      530142   83  Linux
/dev/sdb3         2120584  1952507969   975193693   83  Linux
/dev/sdb4      1952507976  1953503999      498012   83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00053279

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              40     1060289      530125   83  Linux
/dev/sdc2         1060296     2120579      530142   83  Linux
/dev/sdc3         2120584  1952507969   975193693   83  Linux
/dev/sdc4      1952507976  1953503999      498012   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00006a74

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              40     1060289      530125   83  Linux
/dev/sdd2         1060296     2120579      530142   83  Linux
/dev/sdd3         2120584  1952507969   975193693   83  Linux
/dev/sdd4      1952507976  1953503999      498012   83  Linux

Disk /dev/sde: 15.5 GB, 15504900096 bytes
255 heads, 63 sectors/track, 1885 cylinders, total 30283008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7e547e54

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *        2048    30266396    15132174+   7  HPFS/NTFS/exFAT
/dev/sde2        30266397    30266459          31+  21  Unknown
/dev/sde4        21271896    29589043     4158574    0  Empty

lspci

root@Microknoppix:/home/knoppix# lspci
00:00.0 Host bridge: Intel Corporation 82915G/P/GV/GL/PL/910GL Memory Controller Hub (rev 04)
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Integrated Graphics Controller (rev 04)
00:02.1 Display controller: Intel Corporation 82915G Integrated Graphics Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA Controller (rev 03)
40:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express (rev 01)

lscpu

root@Microknoppix:/home/knoppix# lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 4
Stepping:              1
CPU MHz:               2994.432
BogoMIPS:              5991.40
L1d cache:             16K
L2 cache:              1024K

cat /proc/meminfo

root@Microknoppix:/home/knoppix# cat /proc/meminfo
MemTotal:        1020092 kB
MemFree:          476776 kB
MemAvailable:     697384 kB
Buffers:             816 kB
Cached:           422340 kB
SwapCached:            0 kB
Active:           163044 kB
Inactive:         328932 kB
Active(anon):      73260 kB
Inactive(anon):   164464 kB
Active(file):      89784 kB
Inactive(file):   164468 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        130968 kB
HighFree:          60240 kB
LowTotal:         889124 kB
LowFree:          416536 kB
SwapTotal:        765068 kB
SwapFree:         765068 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         68820 kB
Mapped:            66160 kB
Shmem:            168904 kB
Slab:              33984 kB
SReclaimable:      18024 kB
SUnreclaim:        15960 kB
KernelStack:        1824 kB
PageTables:         2604 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1275112 kB
Committed_AS:     655208 kB
VmallocTotal:     122880 kB
VmallocUsed:       15648 kB
VmallocChunk:     101864 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       4096 kB
DirectMap4k:       24568 kB
DirectMap4M:      884736 kB

Here are some Screenshots:

Added 2016-06-20: Hexdump with grub of bad disk:

Speed wiping a hard drive with crypto garbage generated by openssl

0
Filed under Hacking, Linux
Tagged as , , , , ,

random garbage

I just sold an old hard drive on eBay. Before I could do that I wanted to wipe the drive with random data. I started doing it the usual way by overwriting the whole drive with data from /dev/urandom with dd. Like this:

# dd if=/dev/urandom > /dev/sda

And oh my, was it slow. It took ages. So I wondered, what is the hold up? Is dd so slow? Or is it /dev/urandom? It turns out it was both. To be able to compare it I created a small test partition of 524288000 bytes on /dev/sda1 and took some time measurements. Note that this was an old drive in a really old computer. So the absolute speed is catastrophically slow anyway. I am here just interested in the relative speed differences of different methods.

First the dd way:

stargate:~# time dd if=/dev/urandom > /dev/sda1
dd: writing to ‘standard output’: No space left on device
1024001+0 records in
1024000+0 records out
524288000 bytes (524 MB) copied, 139,46 s, 3,8 MB/s

real    2m19.463s
user    0m0.516s
sys     1m47.979s

Now again by avoiding dd and copying the data straight with cp:

stargate:~# time cp /dev/urandom /dev/sda1
cp: error writing ‘/dev/sda1’: No space left on device
cp: failed to extend ‘/dev/sda1’: No space left on device

real    1m38.376s
user    0m0.012s
sys     1m37.226s

Alright. A little bit faster. So cp is a lot faster then dd.

And thanks to the Arch Linux Wiki, here is the super fast way with openssl:

stargate:~# time openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero > /dev/sda1
error writing output file

real    0m22.451s
user    0m14.929s
sys     0m1.476s

So 22 seconds compared to over 2 minutes is quite a nice performance improvement. Note, that dd and /dev/urandom are only used to create a 1024 bit random pass phrase. openssl takes a stream of zeros from /dev/zero and encrypts it with aes-256 and the random pass phrase. The result is basically random garbage. So that way I was able to wipe the whole drive in minutes instead of hours.

If you want a nice progress bar you can also throw in pv like this. Just replace <DISK_SIZE> with the actual size in bytes of the drive you are wiping.

openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero | pv -bartpes <DISK_SIZE> > /dev/sda

Great Scott!! My Volkswagen can travel in time.

0
Filed under Hacking, Hardware
Tagged as ,

Here is a little gem that my brother found. He is working with cars a lot. And there is a special software he uses called VCDS (formerly VAG-COM) which is used for diagnostics and adjustments of cars. Mainly VW, Audi, Skoda and others. And it seems to contain a cool easter egg. In one of the menus it offers the option to enable the flux capacitor (= Fluxkompensator in German).

VCDS Flux Capacitor

VCDS Flux Capacitor

I heard that even though this would work in theory, you would still be short of 1.21 jigawatts to trigger the thing :-).

Great Scott

On a side note: In the German dubbed version of the movie, they translated “Flux Capacitor” wrong. Fluxkompensator actually means flux compensator. Where it should heave been Fluxkondensator.

Reset the Toner Cartridge of a Samsung CLP-510 with a Raspberry Pi

19
Filed under Hacking, Hardware, Linux, Raspberry Pi

Update: In the meantime I developed a user friendly Python program which does all the work with a single command line: SPEER – Samsung Printer EEprom Resetter for Raspberry Pi.

Lousy Business Practices

A little bit more than a year ago I bought a used Samsung CLP-510 color laser printer for a few bucks. It printed fine, but I suspected that the toner was probably almost empty. And with laser printers it’s almost as bad as with ink jets. New toner cartridges are more expensive than the value of the printer. It is even worse with color laser printers, since they need four cartridges. But I figured that I would try to refill the toner cartridges once the time comes. So I bought it. It turned out that the toner cartridges where not completely empty. I used the printer for almost a year. But eventually the printer informed me that it was empty. It contains three toner cartridges:

  • CLP-510D7K/ELS – That’s the black color for 7000 pages.
  • CLP-510D5C/ELS – That’s the cyan color for 5000 pages.
  • CLP-510D5M/ELS – That’s the magenta color for 5000 pages.
  • CLP-510D5Y/ELS – That’s the yellow color for 5000 pages.

The black one was the one which was empty first. So no problem, I thought. Let’s refill them with some new colorful powder. Only then I found out that the cartridges contain a build-in page counter – a little electronic circuit board – which stops you from using the cartridge even if it’s refilled. Well, those are really lousy business practices if you ask me. The manufacturer forces you to buy an expensive new cartridge, even though it would continue to work perfectly by refilling it. Luckily there are some solutions to that problem.

  • You can replace the counter board inside the cartridge with a new one. You can buy those for a few bucks on eBay.
  • You can reset the page counter by reprogramming the EEPROM of the toner counter board.

Solution 2 sounded really geeky. So I went for that.

Read More »

Python script to fix messed up “Date Added” in XBMC / Kodi

11
Filed under Programming, Uncategorized
Tagged as , , ,

I recently switched from MediaPortal to XBMC on my living room HTPC. I was using MediaPortal for a long time. But unfortunately it got more and more unstable from release to release. So I gave XBMC a try and so far I am pretty satisfied with it. I really like how fast it is.

When I add movies to the library, XBMC sets “Date Added” to the file creation date. That is exactly how I like it. I am using 3rd party tools to add movies to the library which are not automatically recognized by XBMC itself (e.g. XBNE). I just added a lot of movies with XBNE. Worked great. Unfortunately XBNE added them with the current date in “Date Added”.

So I wrote a simple python script which goes through all movies in the library’s database and changes “Date Added” to the file’s last modification date.

Read More »

Compiling an Android Linux Kernel for Xperia Phones

0
Filed under Android, Hacking, Hardware, Linux, Xperia T
Tagged as

The Linux kernel for Sony Xperia phones is open source. So nobody is stopping you from compiling your own custom kernel. All you need is a Linux machine, the kernel sources and a couple of tools.

custom_kernel

I will explain the steps needed to build, package and flash a custom kernel by using the Xperia T (LT30p) as an example. The steps should be pretty similar for all other modern Xperia phones.

Read More »

How to Troubleshoot CIFS Problems on Android and Linux in General

49
Filed under Android, Hacking, Linux, Xperia T
Tagged as , , , ,

If you are using Linux kernel 3.4, especially on Android, and you are having troubles mounting windows or samba shares, and you are in a hurry, please skip to section 2 or the conclusion at the end. I just need to tell a little story first.

1. The Story of a Fool

That’s how it’s supposed to be: You take out your Android phone. Mount a windows share to a directory of your liking and start accessing your files from any app you like. Yes, eat that, iPhone. Welcome to the 21st century. At least that’s how it used to be on my Xperia T until I updated the firmware to a newer version.

To be more precise, you need a rooted Android phone. And an app like CifsManager. It’s pretty easy. You can enter a number of windows shares, including user name and password if necessary, and the paths you want them to be mounted to. From now on, you can mount and unmount the shares with a single click. Really neat.

Then one day, I updated the firmware of my Xperia T from 7.0.A.3.195 (Android 4.0.4) to 9.1.A.0.489 (Android 4.1). And the days of happy networking with windows were gone. CifsManager stubbornly denied mounting with an “Invalid argument” error. A very helpful error, I must say.

After hours of googling around, I found many articles, telling me that the linux kernel of the new firmware is probably missing CIFS support. If I am lucky, somebody will create a CIFS kernel module, which could be loaded with insmod. Again many hours later I realized that nobody seems to have done that for my phone. So I gave up, hoping that the issue would be fixed in another firmware.

Read More »

How to install Linux Mint Debian Edition (LMDE) on an encrypted hard drive.

17
Filed under IT, Linux, VirtualBox

Debian is my favorite distro, but I usually don’t recommend it as a desktop environment. LMDE is a nice alternative for Debian fans who want to use Debian as their everyday home/work desktop environment. Unlike Ubuntu, it’s a pure Debian installation (basically Debian Testing), but it uses a more agile and up to date package repository. Many software packages which are known to be a hassle on Debian desktops run seamlessly out of the box. Who hasn’t cried out “Come on Debian, who needs Iceweasel. I want the latest version of Firefox with Flash running”. LMDE goes a little bit along the line “I like to have my cake and eat it too”.

One thing that bothered me tough, is that the LMDE installer didn’t offer any options to encrypt the partition(s). I found a howto by hashstat Howto install LMDE with LVM (with or without encryption). However I didn’t like the idea of transforming the Live CD into the final system.

The main part of the solution I describe here is heavily based on hashstat howto. However, we install LMDE onto a virtual machine and then transfer it onto the encrypted partition. There are three steps:

  1. Install LMDE on a VirtualBox VM
  2. Prepare encrypted disk
  3. Transfer LMDE from the virtual machine to the real machine

In my case, I installed LMDE on a virtual machine on my notebook. If you don’t have an extra computer, it might also be possible to install LMDE on a flash drive and use it later to transfer it to your real machine. However I didn’t try that. The virtual machine method was fitting for me, since I had LMDE already installed on it for a test drive.

Read More »

Geo Relocate Firefox Extention

0
Filed under Firefox, Geo Relocation Firefox Extension, Internet, Programming, Uncategorized
Tagged as , , ,

The other day I wrote about my experiments with Firefox’s implementation of the W3C geo location API.

I was able to package my modifications as a Firefox Extension, which anybody can use to the change the coordinates reported by the geo location API. Check it out at the Geo Location Firefox Extension project page.

Copy Paste Hell Between Windows Host and Linux Guest in VirtualBox

5
Filed under Linux, VirtualBox
Tagged as , , ,

The X server maintains three different selection buffers, PRIMARY, SECONDARY and CLIPBOARD. The PRIMARY buffer is usually used for copying and pasting via the middle mouse button. And the CLIPBOARD buffer is used when the user selects some data and explicitly requests it to be “copied” to the clipboard, such as by invoking “Copy”.

The VirtualBox client tool synchronizes the Windows clipboard content to the PRIMARY and CLIPBOARD buffer of a Linux host. But it only synchronizes the CLIPBOARD buffer back out to the Windows host. The reason why it’s not using the PRIMARY selection is that by only selecting a text in Linux overwrites the Windows clipboard immediately, which is an unexpected behavior for Windows users. At least that’s their excuse.

It might not be the expected behavior for Windows users. But it’s definitely not the expected behavior for Linux users. The forums are filled with posts like “Copy/Paste from Linux guest to Windows doesn’t work”. It is especially annoying that the selected text from a terminal window can not be easily pasted out to the Windows host. There are a couple solutions. But none are really satisfying.

Read More »