MSI Hermes 845GV - Fedora

Hardware description on main page. This machine is an i686 machine.

I used a temporary drive (80 GB) for Fedora testing.

History / work log

2016-09-06: F24 - another reboot, to check kernel messages about the drive.

[tingo@kg-htpc ~]$ dmesg | grep sd
[    1.081489] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.081652] sd 0:0:0:0: [sda] 156365903 512-byte logical blocks: (80.1 GB/74.6 GiB)
[    1.081767] sd 0:0:0:0: [sda] Write Protect is off
[    1.081772] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.081819] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.091154]  sda: sda1 sda2
[    1.091684] sd 0:0:0:0: [sda] Attached SCSI disk
[   19.610613] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   19.618976] sd 2:0:0:0: [sdb] 1074591 1024-byte logical blocks: (1.10 GB/1.02 GiB)
[   19.621979] sd 2:0:0:0: [sdb] Write Protect is off
[   19.621988] sd 2:0:0:0: [sdb] Mode Sense: 9f 00 00 08
[   19.625985] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   19.678418] sd 2:0:0:0: [sdb] Attached SCSI disk
[   28.706449] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   32.889277] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

yep, looks like we have a winner.

2016-09-06: F24 - check if the drive has changed: sg_format

[tingo@kg-htpc ~]$ sudo sg_format /dev/sg1
    SEAGATE   ST31200N          8008   peripheral_type: disk [0x0]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=0 [0x0]
  Block size=1024 [0x400]
Read Capacity (10) results:
   Number of logical blocks=1074591
   Logical block size=1024 bytes
No changes made. To format use '--format'. To resize use '--resize'

looks ok. sg_readcap

[tingo@kg-htpc ~]$ sudo sg_readcap /dev/sg1
Read Capacity results:
   Last logical block address=1074590 (0x10659e), Number of blocks=1074591
   Logical block length=1024 bytes
Hence:
   Device size: 1100381184 bytes, 1049.4 MiB, 1.10 GB

looks ok too.

2016-09-06: F24 - install sg3_utils so I can check the drive:

[tingo@kg-htpc ~]$ sudo dnf search sg3_utils
Last metadata expiration check: 1:36:22 ago on Tue Sep  6 20:35:59 2016.
============================================= N/S Matched: sg3_utils =============================================
sg3_utils.i686 : Utilities for devices that use SCSI command sets
sg3_utils-libs.i686 : Shared library for sg3_utils
sg3_utils-devel.i686 : Development library and header files for the sg3_utils library
smp_utils-devel.i686 : Development library and header files for the sg3_utils library
[tingo@kg-htpc ~]$ sudo dnf install sg3_utils
Last metadata expiration check: 1:36:42 ago on Tue Sep  6 20:35:59 2016.
Dependencies resolved.
==================================================================================================================
 Package                         Arch                  Version                      Repository               Size
==================================================================================================================
Installing:
 sg3_utils                       i686                  1.41-3.fc24                  fedora                  769 k
 sg3_utils-libs                  i686                  1.41-3.fc24                  fedora                   67 k

Transaction Summary
==================================================================================================================
Install  2 Packages

Total download size: 836 k
Installed size: 2.0 M
Is this ok [y/N]: y
[...]
Installed:
  sg3_utils.i686 1.41-3.fc24                            sg3_utils-libs.i686 1.41-3.fc24                          

Complete!

ok.

2016-09-06: F24 - now, test if setblocksize will work.

[tingo@kg-htpc ~]$ sudo work/setblocksize/setblocksize -b1024 /dev/sg1

setblocksize V0.2

Checking parameters ...
   Blocksize specified.
   Done.
New blocksize: 1024 Bytes
Format timeout: 120 minutes
Open device file ...
   Done.
Prepare command ...
   Done.
Send INQUIRY command ...
   Done.
Check status ...
   Command successful.
Check for LUN ...
   LUN present.

===============================================================================
SCSI ID     : 0
LUN         : 0
Connected to: Host2 / Channel0
Manufacturer: SEAGATE
Model       : ST31200N       
Device type : Disk
===============================================================================
Do you really want to reformat this device [y/n]? y
Prepare command ...
   Done.
Send MODE SELECT command ...
   Done.
Check status ...
   Command successful.
Prepare command ...
   Done.
Send FORMAT UNIT command ...
   *** Please wait - Do not manually interrupt or power down! ***
(the LED on the drive lights up, now I have to wait)
   Done.
Check status ...
   Command successful.
Close device file ...
   Done.

Exiting ...

it only took about 20 minutes.

2016-09-06: F24 - after connecting the SCSI drive and booting the machine I find this:

[tingo@kg-htpc ~]$ ls -l /dev/sd*
brw-rw----. 1 root disk 8,  0 Sep  6 21:34 /dev/sda
brw-rw----. 1 root disk 8,  1 Sep  6 21:34 /dev/sda1
brw-rw----. 1 root disk 8,  2 Sep  6 21:34 /dev/sda2
brw-rw----. 1 root disk 8, 16 Sep  6 21:34 /dev/sdb
[tingo@kg-htpc ~]$ ls -l /dev/sg*
crw-rw----. 1 root disk 21, 0 Sep  6 21:34 /dev/sg0
crw-rw----. 1 root disk 21, 1 Sep  6 21:34 /dev/sg1

checking dmesg:

[tingo@kg-htpc ~]$ dmesg | grep sd
[    1.081478] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.081650] sd 0:0:0:0: [sda] 156365903 512-byte logical blocks: (80.1 GB/74.6 GiB)
[    1.081766] sd 0:0:0:0: [sda] Write Protect is off
[    1.081771] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.081818] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.091600]  sda: sda1 sda2
[    1.092182] sd 0:0:0:0: [sda] Attached SCSI disk
[   19.581428] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   19.599840] sd 2:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   19.599851] sd 2:0:0:0: [sdb] Sense Key : Medium Error [current]
[   19.599858] sd 2:0:0:0: [sdb] Add. Sense: Medium format corrupted
[   19.602945] sd 2:0:0:0: [sdb] Write Protect is off
[   19.602955] sd 2:0:0:0: [sdb] Mode Sense: 9f 00 00 08
[   19.606941] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   19.626816] sd 2:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   19.626828] sd 2:0:0:0: [sdb] Sense Key : Medium Error [current]
[   19.626835] sd 2:0:0:0: [sdb] Add. Sense: Medium format corrupted
[   19.635282] sd 2:0:0:0: [sdb] Attached SCSI disk
[   27.912324] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   32.063637] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

ok, so the real SCSI drive is sdb / sg1. Good to know.

2016-09-06: F24 - try to compile setblocksize. Unpack:

[tingo@kg-htpc setblocksize]$ tar xvf ~/dl/setblocksize-V0.2.tar.bz2
./LICENSE
./Makefile
./README
./doc/
./doc/scsi-generic_long.txt
./doc/Example.txt
./include/
./include/sg_err.h
./setblocksize.c
./sg_err.c

install kernel headers, we need them:

[tingo@kg-htpc setblocksize]$ sudo dnf install kernel-headers
Last metadata expiration check: 0:15:25 ago on Tue Sep  6 20:35:59 2016.
Dependencies resolved.
==================================================================================================================
 Package                        Arch                 Version                        Repository               Size
==================================================================================================================
Installing:
 kernel-headers                 i686                 4.7.2-201.fc24                 updates                 1.0 M

Transaction Summary
==================================================================================================================
Install  1 Package

Total download size: 1.0 M
Installed size: 3.7 M
Is this ok [y/N]: y
[...]
Installed:
  kernel-headers.i686 4.7.2-201.fc24                                                                             

Complete!

now try to compile

[tingo@kg-htpc setblocksize]$ make all

Creating main object file ...
gcc -I ./include -D_REENTRANT -Wall -pipe -c -o setblocksize.o setblocksize.c
make: gcc: Command not found
Makefile:101: recipe for target 'setblock

ok, we need gcc as well

[tingo@kg-htpc setblocksize]$ sudo dnf install gcc
Last metadata expiration check: 0:18:54 ago on Tue Sep  6 20:35:59 2016.
Dependencies resolved.
==================================================================================================================
 Package                       Arch                 Version                         Repository               Size
==================================================================================================================
Installing:
 binutils                      i686                 2.26.1-1.fc24                   updates                 6.2 M
 cpp                           i686                 6.1.1-3.fc24                    updates                 8.7 M
 gcc                           i686                 6.1.1-3.fc24                    updates                  18 M
 glibc-devel                   i686                 2.23.1-7.fc24                   fedora                  935 k
 glibc-headers                 i686                 2.23.1-7.fc24                   fedora                  500 k
 isl                           i686                 0.14-5.fc24                     fedora                  507 k
 libasan                       i686                 6.1.1-3.fc24                    updates                 325 k
 libatomic                     i686                 6.1.1-3.fc24                    updates                  31 k
 libcilkrts                    i686                 6.1.1-3.fc24                    updates                  65 k
 libmpc                        i686                 1.0.2-5.fc24                    fedora                   56 k
 libmpx                        i686                 6.1.1-3.fc24                    updates                  34 k
 libubsan                      i686                 6.1.1-3.fc24                    updates                 136 k
 mpfr                          i686                 3.1.4-1.fc24                    fedora                  218 k
Upgrading:
 libgcc                        i686                 6.1.1-3.fc24                    updates                  93 k
 libgomp                       i686                 6.1.1-3.fc24                    updates                 190 k

Transaction Summary
==================================================================================================================
Install  13 Packages
Upgrade   2 Packages

Total download size: 36 M
Is this ok [y/N]: y
[...]
Installed:
  binutils.i686 2.26.1-1.fc24          cpp.i686 6.1.1-3.fc24                  gcc.i686 6.1.1-3.fc24            
  glibc-devel.i686 2.23.1-7.fc24       glibc-headers.i686 2.23.1-7.fc24       isl.i686 0.14-5.fc24             
  libasan.i686 6.1.1-3.fc24            libatomic.i686 6.1.1-3.fc24            libcilkrts.i686 6.1.1-3.fc24     
  libmpc.i686 1.0.2-5.fc24             libmpx.i686 6.1.1-3.fc24               libubsan.i686 6.1.1-3.fc24       
  mpfr.i686 3.1.4-1.fc24             

Upgraded:
  libgcc.i686 6.1.1-3.fc24                                libgomp.i686 6.1.1-3.fc24                              

Complete!

another try at compiling:

[tingo@kg-htpc setblocksize]$ make all

Creating main object file ...
gcc -I ./include -D_REENTRANT -Wall -pipe -c -o setblocksize.o setblocksize.c
setblocksize.c: In function main:
setblocksize.c:302:18: warning: pointer targets in passing argument 2 of strncpy differ in signedness [-Wpointer-sign]
    strncpy(sbuf, scsi_buf + sizeof(struct sg_header) + 0x08, 0x08);
                  ^~~~~~~~
In file included from setblocksize.c:69:0:
/usr/include/string.h:128:14: note: expected const char * restrict but argument is of type unsigned char *
 extern char *strncpy (char *__restrict __dest,
              ^~~~~~~
setblocksize.c:305:18: warning: pointer targets in passing argument 2 of strncpy differ in signedness [-Wpointer-sign]
    strncpy(sbuf, scsi_buf + sizeof(struct sg_header) + 0x10, 0x10);
                  ^~~~~~~~
In file included from setblocksize.c:69:0:
/usr/include/string.h:128:14: note: expected const char * restrict but argument is of type unsigned char *
 extern char *strncpy (char *__restrict __dest,
              ^~~~~~~

Creating error handling object file ...
gcc -I ./include -D_REENTRANT -Wall -pipe -c -o sg_err.o sg_err.c

Creating binary ...
gcc -o setblocksize setblocksize.o sg_err.o

Finished.

looks like it worked

[tingo@kg-htpc setblocksize]$ ./setblocksize

setblocksize V0.2

Checking parameters ...
   Parameter error!
   Usage: 'setblocksize [-b<Blocksize in Byte>] [-t<Timeout in Minutes>] <sg_device>'

ok, install hard drive then try it.

2016-09-06: F24 - get setblocksize onto the machine:

[tingo@kg-htpc dl]$ wget http://micha.freeshell.org/scsi/setblocksize-V0.2.tar.bz2
--2016-09-06 20:46:17--  http://micha.freeshell.org/scsi/setblocksize-V0.2.tar.bz2
Resolving micha.freeshell.org (micha.freeshell.org)... 192.94.73.31
Connecting to micha.freeshell.org (micha.freeshell.org)|192.94.73.31|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45741 (45K) [application/x-bzip2]
Saving to: setblocksize-V0.2.tar.bz2

setblocksize-V0.2.tar.bz2    100%[============================================>]  44.67K   107KB/s    in 0.4s   

2016-09-06 20:46:18 (107 KB/s) - setblocksize-V0.2.tar.bz2 saved [45741/45741]

ok.

2016-09-06: F24 server - LVM on sda2. It comes up with a web console (https) on port 9090, hmm...

[tingo@kg-htpc ~]$ cat /etc/fedora-release
Fedora release 24 (Twenty Four)
[tingo@kg-htpc ~]$ uname -a
Linux kg-htpc.kg4.no 4.5.5-300.fc24.i686 #1 SMP Thu May 19 13:42:13 UTC 2016 i686 i686 i386 GNU/Linux

disk layout:

[tingo@kg-htpc ~]$ lsblk -i
NAME                     MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                        8:0    0 74.6G  0 disk
|-sda1                     8:1    0  500M  0 part /boot
`-sda2                     8:2    0 74.1G  0 part
  |-fedora_kg--htpc-root 253:0    0   15G  0 lvm  /
  `-fedora_kg--htpc-swap 253:1    0    2G  0 lvm  [SWAP]
sr0                       11:0    1 1024M  0 rom 
sr1                       11:1    1  1.9G  0 rom 
Hmm, sr1 is probably my removable Plextor - yes it was.

filesystem layout:

[tingo@kg-htpc ~]$ df -h
Filesystem                        Size  Used Avail Use% Mounted on
devtmpfs                          490M     0  490M   0% /dev
tmpfs                             501M     0  501M   0% /dev/shm
tmpfs                             501M  696K  500M   1% /run
tmpfs                             501M     0  501M   0% /sys/fs/cgroup
/dev/mapper/fedora_kg--htpc-root   15G  970M   15G   7% /
tmpfs                             501M  4.0K  501M   1% /tmp
/dev/sda1                         477M   98M  350M  22% /boot
tmpfs                             101M     0  101M   0% /run/user/1000

ok. PCI devices:

[tingo@kg-htpc ~]$ lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
01:01.0 SCSI storage controller: Adaptec AIC-7850T/7856T [AVA-2902/4/6 / AHA-2910] (rev 03)
01:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
01:07.0 FireWire (IEEE 1394): NEC Corporation uPD72874 [Firewarden] IEEE1394a OHCI 1.1 Link/3-port PHY Controller (rev 01)
01:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (LOM) Ethernet Controller (rev 82)

The AVA-2904 SCSI card is recognized - good.

2016-09-06: Fedora 24 server installation - I opted to install from av (physical) DVD, using my Plextor portable drive (usb connected). It is a bit slower, but it works. English language for install. Settings - Norwegian keyboard, set the name to kg-htpc.kg4.no, I selected free space (about 20 GB) on the hard drive to install on. Unfortunately, the installer program (anaconda) crashed while setting up the rest of the install. I try again. And it crashed again in the same spot. Next, I try text installation, by adding inst.text to the cmdline in the boot menu. I am allowed a choice of VNC - I'll try that. I must set a password, then it asks me to connect to 10.1.161.34:1. From my FreeBSD workstation, I start vncviewer 10.1.161.34:1, it asks for the password and the Fedora 24 install screen shows. I set up automatic partitioning (this time the installer doesn't crash), create a user (admin)and off I go. After quite a while it is installed, and I reboot to start it.

2016-09-05: I tried several different usb sticks and images, but the machine simply doesn't want to boot from them, it has options for a "USB RMD-FDD" and it thinks it is a floppy. Gross.