[Gelöst]Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Antworten
menno
Beiträge: 7
Registriert: 27 Dez 2014, 15:22

[Gelöst]Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von menno »

Hallo,

Ich will ein 32 bit System auf einem PC installieren.
Der PC startet, mit miniroot.bz2 vom 26.01.2016, die Festplatte wrid partitioniert und dann hängt die Installation mit der folgenden Meldung.


Code: Alles auswählen

Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)
mkfs.fat 3.0.26 (2014-03-07)
mkfs.vfat: unable to open /dev/sda1: Device or resource busy
Ich bin dann in das per PXE gestartete Linux gegangen und habe mit

Code: Alles auswählen

 
 fdisk /dev/sda
 
von Hand partitioniert.
Beim Schreiben bekam ich immer die Meldung, dass ioctl() fehlgeschlagen sein.

Normalerweise behelfe ich mich dann mit kpartx -s /dev/sda,
das ist hier aber leider keine Option.

Der selbe PC per grml gestartet bereitet gar keine Probleme.
ioctl() wird durch fdisk problemlos ausgeführt.

Die Pakete sind frisch geupdatete.

Code: Alles auswählen

opsi-product-updater -vv
Btw, es ist der zweite PC, mit dem es eine installation versuche.

Habt ihr eine Idee, wonach ich suchen könnte?

Gruß
Heiko
Zuletzt geändert von menno am 12 Apr 2016, 14:02, insgesamt 1-mal geändert.
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von m.radtke »

Hi

Device or resource busy deutet darauf hin da sdie Partition irgendwo benutzt wird.

Welches produkt?
Welche Produktversion?
Kannst Du es reproduzieren?
Wenn ja schau mal mit

Code: Alles auswählen

mount
ob die Partition gemounted ist.

Zudem würde ein kompletter Log des Bootimages bei der Fehleranalyse helfen.
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
menno
Beiträge: 7
Registriert: 27 Dez 2014, 15:22

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von menno »

Hallo,

erstmal vielen Dank für die schnelle Antwort.

Produkt: winxppro 4.0.1-3

Auf Debian Wheezy
opsiconfd 4.0.6.11-2
opsi-linux-bootimage 20160111-1

Heute geupdatetet.

> Kannst Du es reproduzieren?
Leider ja.
Ich habe zwei unterschiedliche PCs versucht aufzusetzen.
Immer wieder das gleiche.
Beide PCs waren vorher Teil eines anderen OPSI-Netzes. damit hatte ich vorher nie Probleme.

Ich hatte mich ein paar mal eingelogt in das miniroot.bz2

Mit
mount
konnte ich die Platte nicht finden.

Oh, den Tipp aus dem Log habe ich noch nicht getestet.
> If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) (Posix.py|836)
> to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (Posix.py|836)

Mal schauen, ob ich morgen beim Kunden rein komme.

Bevor ich das Logfile poste:
Die ganzen 4231 Zeilen?

Kann ich das irgendwo als Anhang anhängen? Oder einfach posten.

Gruß
Heiko
menno
Beiträge: 7
Registriert: 27 Dez 2014, 15:22

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von menno »

So, ich habe einfach die 200 letzten Zeilen des boot-logs gepostet.
Wenn ich das Log richtig interpretiere, habe ich zwei Installationsversuche gepostet.
Ich komme erst am Dienstag wieder zum Kunden und kann testen und probieren.

Aufgefallen ist mir, dass ein LVM gefunden wurde. Das habe ich auch in Logs anderer Server gefunden (betreue noch 8 weitere Netzwerke mit OPSI), dort war es aber kein Problem.

Code: Alles auswählen

[6] [Apr 08 12:55:51] Executing: /sbin/blkid -o value -s TYPE /dev/sda1 (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>> LVM2_member (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 0 (Posix.py|843)
[7] [Apr 08 12:55:51] Found filesystem: LVM2_member with blkid tool, using now this filesystemtype. (Posix.py|1491)
Ich stelle mir die Frage, warum sda1 member eines LVM2 sein soll.
Das konnte ich vor Ort noch nicht prüfen.

Code: Alles auswählen

[5] [Apr 08 12:55:49] unrecognized partition table type, writing empty partitiontable (Posix.py|1416)
[7] [Apr 08 12:55:49] Command 'echo' found at: '/bin/echo' (Posix.py|701)
[6] [Apr 08 12:55:49] Executing: /bin/echo -e "0,0



" | /sbin/sfdisk -L --no-reread -D /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Old situation: (Posix.py|836)
[7] [Apr 08 12:55:49] >>> New situation: (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>>    Device Boot Start     End   #cyls    #blocks   Id  System (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda1          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda2          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda3          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda4          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> sfdisk: ERROR: sector 0 does not have an msdos signature (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  /dev/sda: unrecognized partition table type (Posix.py|836)
[7] [Apr 08 12:55:49] >>> No partitions found (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Warning: no primary partition is marked bootable (active) (Posix.py|836)
[7] [Apr 08 12:55:49] >>> This does not matter for LILO, but the DOS MBR will not boot this disk. (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Successfully wrote the new partition table (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Re-reading the partition table ... (Posix.py|836)
[7] [Apr 08 12:55:49] >>> BLKRRPART: Device or resource busy (Posix.py|836)
[7] [Apr 08 12:55:49] >>> The command to re-read the partition table failed. (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Run partprobe(8), kpartx(8) or reboot your system now, (Posix.py|836)
[7] [Apr 08 12:55:49] >>> before using mkfs (Posix.py|836)
[7] [Apr 08 12:55:49] >>> If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) (Posix.py|836)
[7] [Apr 08 12:55:49] >>> to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (Posix.py|836)
[7] [Apr 08 12:55:49] >>> (See fdisk(8).) (Posix.py|836)
[7] [Apr 08 12:55:49] Exit code: 1 (Posix.py|843)
[6] [Apr 08 12:55:49] Executing: /sbin/sfdisk -L --no-reread -l /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>>    Device Boot Start     End   #cyls    #blocks   Id  System (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda1          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda2          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda3          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda4          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:49] Total cylinders of disk '/dev/sda': 19457, 8225280 bytes per cylinder (Posix.py|1461)
[6] [Apr 08 12:55:49] Executing: /sbin/sfdisk -L --no-reread -uS -l /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Units = sectors of 512 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>>    Device Boot    Start       End   #sectors  Id  System (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda1             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda2             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda3             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda4             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:49] Total sectors of disk '/dev/sda': 312581808, 512 bytes per cylinder (Posix.py|1582)
[7] [Apr 08 12:55:49] Executing jsonrpc method 'backend_setOptions' on host 10.8.11.10 (JSONRPC.py|115)
[7] [Apr 08 12:55:49] Posting request... (JSONRPC.py|706)
[7] [Apr 08 12:55:49] Starting new HTTPS connection (0) to 10.8.11.10:4447 (HTTP.py|587)
[7] [Apr 08 12:55:49] Connection established to: 10.8.11.10 (HTTP.py|600)
[7] [Apr 08 12:55:49] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.py|191)
[7] [Apr 08 12:55:49] Closing connection: <httplib.HTTPSConnection instance at 0xb5a5c32c> (HTTP.py|530)
[7] [Apr 08 12:55:49] Content-Type: gzip-application/json;charset=utf-8, Content-Encoding: deflate (JSONRPC.py|723)
[7] [Apr 08 12:55:49] Expecting deflated data from server (backwards compatible) (JSONRPC.py|731)
[7] [Apr 08 12:55:49] Executing jsonrpc method 'productOnClient_getObjects' on host 10.8.11.10 (JSONRPC.py|115)
[7] [Apr 08 12:55:49] Posting request... (JSONRPC.py|706)
[7] [Apr 08 12:55:49] Starting new HTTPS connection (0) to 10.8.11.10:4447 (HTTP.py|587)
[7] [Apr 08 12:55:49] Connection established to: 10.8.11.10 (HTTP.py|600)
[7] [Apr 08 12:55:49] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.py|191)
[7] [Apr 08 12:55:49] Closing connection: <httplib.HTTPSConnection instance at 0xb5bc7fec> (HTTP.py|530)
[7] [Apr 08 12:55:49] Content-Type: gzip-application/json;charset=utf-8, Content-Encoding: deflate (JSONRPC.py|723)
[7] [Apr 08 12:55:49] Expecting deflated data from server (backwards compatible) (JSONRPC.py|731)
[7] [Apr 08 12:55:49] Executing jsonrpc method 'productOnClient_deleteObjects' on host 10.8.11.10 (JSONRPC.py|115)
[7] [Apr 08 12:55:49] Posting request... (JSONRPC.py|706)
[7] [Apr 08 12:55:49] Starting new HTTPS connection (0) to 10.8.11.10:4447 (HTTP.py|587)
[7] [Apr 08 12:55:49] Connection established to: 10.8.11.10 (HTTP.py|600)
[7] [Apr 08 12:55:49] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.py|191)
[7] [Apr 08 12:55:49] Closing connection: <httplib.HTTPSConnection instance at 0xb5a5c30c> (HTTP.py|530)
[7] [Apr 08 12:55:49] Content-Type: gzip-application/json;charset=utf-8, Content-Encoding: deflate (JSONRPC.py|723)
[7] [Apr 08 12:55:49] Expecting deflated data from server (backwards compatible) (JSONRPC.py|731)
[6] [Apr 08 12:55:49] Creating partition on '/dev/sda': number: 1, type 'primary', filesystem 'fat32', start: 2048 sec, end: 312581807 sec. (Posix.py|2188)
[7] [Apr 08 12:55:49] Writing partition table to disk /dev/sda (Posix.py|1585)
[7] [Apr 08 12:55:49]    number: 1, start: 1 MB (2048 sec), end: 160041 MB (312581807 sec), size: 160040 MB (312579760 sec), type: c, fs: fat32, boot: True (Posix.py|1600)
[7] [Apr 08 12:55:49] Partition 2 not found: Partition 2 does not exist (Posix.py|1616)
[7] [Apr 08 12:55:49] Partition 3 not found: Partition 3 does not exist (Posix.py|1616)
[7] [Apr 08 12:55:49] Partition 4 not found: Partition 4 does not exist (Posix.py|1616)
[6] [Apr 08 12:55:49] Executing: /bin/echo -e "2048,312579760,c,*
0,0
0,0
0,0
" | /sbin/sfdisk -L --no-reread -uS -f /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Old situation: (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Units = sectors of 512 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>>    Device Boot    Start       End   #sectors  Id  System (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda1             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda2             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda3             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda4             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> New situation: (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Units = sectors of 512 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>>    Device Boot    Start       End   #sectors  Id  System (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda1   *      2048 312581807  312579760   c  W95 FAT32 (LBA) (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda2             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda3             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> /dev/sda4             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Successfully wrote the new partition table (Posix.py|836)
[7] [Apr 08 12:55:49] >>>  (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Re-reading the partition table ... (Posix.py|836)
[7] [Apr 08 12:55:49] >>> BLKRRPART: Device or resource busy (Posix.py|836)
[7] [Apr 08 12:55:49] >>> The command to re-read the partition table failed. (Posix.py|836)
[7] [Apr 08 12:55:49] >>> Run partprobe(8), kpartx(8) or reboot your system now, (Posix.py|836)
[7] [Apr 08 12:55:49] >>> before using mkfs (Posix.py|836)
[7] [Apr 08 12:55:49] >>> If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) (Posix.py|836)
[7] [Apr 08 12:55:49] >>> to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (Posix.py|836)
[7] [Apr 08 12:55:49] >>> (See fdisk(8).) (Posix.py|836)
[7] [Apr 08 12:55:49] Exit code: 1 (Posix.py|843)
[6] [Apr 08 12:55:49] Forcing kernel to reread partition table of '/dev/sda'. (Posix.py|1648)
[6] [Apr 08 12:55:49] Executing: /sbin/partprobe /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:49] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:49] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:51] Executing: /sbin/sfdisk -L --no-reread -s -uB /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>> 156290904 (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:51] Size of disk '/dev/sda': 160041885696 Byte / 152627 MB (Posix.py|1407)
[6] [Apr 08 12:55:51] Executing: /sbin/sfdisk -L --no-reread -l /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>>  (Posix.py|836)
[7] [Apr 08 12:55:51] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:51] >>> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:51] >>>  (Posix.py|836)
[7] [Apr 08 12:55:51] >>>    Device Boot Start     End   #cyls    #blocks   Id  System (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda1   *      0+  19457-  19458- 156289880    c  W95 FAT32 (LBA) (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda2          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda3          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda4          0       -       0          0    0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:51] Total cylinders of disk '/dev/sda': 19457, 8225280 bytes per cylinder (Posix.py|1461)
[7] [Apr 08 12:55:51] Trying using Blkid (Posix.py|1484)
[6] [Apr 08 12:55:51] Executing: /sbin/blkid -o value -s TYPE /dev/sda1 (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>> LVM2_member (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 0 (Posix.py|843)
[7] [Apr 08 12:55:51] Found filesystem: LVM2_member with blkid tool, using now this filesystemtype. (Posix.py|1491)
[7] [Apr 08 12:55:51] Partition found =>>> number: 1, start: 0 MB (0 cyl), end: 152633 MB (19457 cyl), size: 152633 MB (19458 cyl), type: c, fs: LVM2_member, boot: True (Posix.py|1526)
[7] [Apr 08 12:55:51] Waiting for device '/dev/sda1' to appear (Posix.py|1531)
[7] [Apr 08 12:55:51] Device '/dev/sda1' found (Posix.py|1539)
[6] [Apr 08 12:55:51] Executing: /sbin/sfdisk -L --no-reread -uS -l /dev/sda (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>>  (Posix.py|836)
[7] [Apr 08 12:55:51] >>> Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track (Posix.py|836)
[7] [Apr 08 12:55:51] >>> Units = sectors of 512 bytes, counting from 0 (Posix.py|836)
[7] [Apr 08 12:55:51] >>>  (Posix.py|836)
[7] [Apr 08 12:55:51] >>>    Device Boot    Start       End   #sectors  Id  System (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda1   *      2048 312581807  312579760   c  W95 FAT32 (LBA) (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda2             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda3             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] >>> /dev/sda4             0         -          0   0  Empty (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 0 (Posix.py|843)
[6] [Apr 08 12:55:51] Total sectors of disk '/dev/sda': 312581808, 512 bytes per cylinder (Posix.py|1582)
[7] [Apr 08 12:55:51] Partition sector values =>>> number: 1, start: 2048 sec, end: 312581807 sec, size: 312579760 sec  (Posix.py|1572)
[6] [Apr 08 12:55:51] Creating filesystem 'fat32' on '/dev/sda1'. (Posix.py|2325)
[6] [Apr 08 12:55:51] Executing: mkfs.vfat -F 32 /dev/sda1 (Posix.py|759)
[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>> mkfs.fat 3.0.26 (2014-03-07) (Posix.py|836)
[7] [Apr 08 12:55:51] >>> mkfs.vfat: unable to open /dev/sda1: Device or resource busy (Posix.py|836)
[7] [Apr 08 12:55:51] Exit code: 1 (Posix.py|843)
[2] [Apr 08 12:55:52] Traceback: (Logger.py|765)
[2] [Apr 08 12:55:52]      line 1461 in '<module>' in file '/usr/local/bin/master.py' (Logger.py|765)
[2] [Apr 08 12:55:52]      line 95 in '<module>' in file '/tmp/setup.py' (Logger.py|765)
[2] [Apr 08 12:55:52]      line 2354 in 'createFilesystem' in file '/usr/lib/python2.7/dist-packages/OPSI/System/Posix.py' (Logger.py|765)
[2] [Apr 08 12:55:52]      line 850 in 'execute' in file '/usr/lib/python2.7/dist-packages/OPSI/System/Posix.py' (Logger.py|765)
[2] [Apr 08 12:55:52]      ==>>> Command 'mkfs.vfat -F 32 /dev/sda1' failed (1):
mkfs.fat 3.0.26 (2014-03-07)
mkfs.vfat: unable to open /dev/sda1: Device or resource busy (master.py|1509)
[7] [Apr 08 12:55:52] Backend: <JSONRPCBackend(host=u'10.8.11.10', deflate=False)> (master.py|1512)
[7] [Apr 08 12:55:52] ProductId: winxppro (master.py|1513)
[7] [Apr 08 12:55:52] ClientId: win02.example.local (master.py|1514)
[7] [Apr 08 12:55:52] ProductOnClient: <ProductOnClient(clientId=u'win02.example.local', productId=u'winxppro', installationStatus=u'unknown', actionRequest=u'none')> (master.py|1515)
[6] [Apr 08 12:55:52] Updating productOnClient: {'actionProgress': u'', 'actionResult': u'failed', 'clientId': u'win02.example.local', 'modificationTime': None, 'actionRequest': u'none', 'targetConfiguration': None, 'productVersion': None, 'productType': u'NetbootProduct', 'type': u'ProductOnClient', 'lastAction': None, 'packageVersion': None, 'actionSequence': None, 'installationStatus': u'unknown', 'productId': u'winxppro'} (master.py|1526)
[7] [Apr 08 12:55:52] Executing jsonrpc method 'productOnClient_updateObjects' on host 10.8.11.10 (JSONRPC.py|115)
[7] [Apr 08 12:55:52] Posting request... (JSONRPC.py|706)
[7] [Apr 08 12:55:52] Starting new HTTPS connection (0) to 10.8.11.10:4447 (HTTP.py|587)
[7] [Apr 08 12:55:52] Connection established to: 10.8.11.10 (HTTP.py|600)
[7] [Apr 08 12:55:52] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.py|191)
[7] [Apr 08 12:55:52] Closing connection: <httplib.HTTPSConnection instance at 0xb5b0b20c> (HTTP.py|530)
[7] [Apr 08 12:55:52] Content-Type: gzip-application/json;charset=utf-8, Content-Encoding: deflate (JSONRPC.py|723)
[7] [Apr 08 12:55:52] Expecting deflated data from server (backwards compatible) (JSONRPC.py|731)
[5] [Apr 08 12:55:52] Writing log to service (master.py|1536)

holgerv
Beiträge: 288
Registriert: 20 Aug 2012, 09:35

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von holgerv »

Hi,

im "win7-x64"-Netboot-Produkt gab es mal einen Bug, der dazu führte, dass /dev/sda1 nicht formatiert werden konnte, wenn die Partition früher mal als LVM-Volume genutzt wurde. Es kam u. a. zu den Fehlermeldungen "Device or resource busy" und "This disk is currently in use".

uib hat den Bug damals (2012) behoben, aber ich weiß nicht, in welchen Netboot-Produkten der Bug behoben wurde.

Schönen Gruß


Holger
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von n.wenselowski »

holgerv hat geschrieben:uib hat den Bug damals (2012) behoben, aber ich weiß nicht, in welchen Netboot-Produkten der Bug behoben wurde.
Puh, lange her :D
Da wäre dann die Frage welche Version eingesetzt wird.

Hast du schonmal ein wipedisk auf dem Rechner durchführen lassen? Danach sollte zumindest die Platte von möglichen Rückständen befreit sein.


-N

Code: Alles auswählen

import OPSI
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von m.radtke »

menno hat geschrieben: Produkt: winxppro 4.0.1-3
Das ist sehr alt. Unter 4.0.6 Unterstützen wir kein XP mehr. Auf unserem Opsi Server haben wir winxppo in Version 4.0.5-2
Updates per product updater updaten die Windows Netboot Produkte nicht, da dort ja auch due Custom Sachen überschrieben werden können.

Hier der Link dazu
http://download.uib.de/opsi4.0/archiv/o ... 0.5-2.opsi
Bitte einfach mal installieren und es erneut probieren.

Ansonsten beim fehlgeschlagenen Befehl im Bootimage den Befehl der Fehlschlägt auf der Shell ausführen, am besten mit verbose Funktionen um mehr Output zu bekommen.
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
menno
Beiträge: 7
Registriert: 27 Dez 2014, 15:22

Re: Command 'mkfs.vfat -F 32 /dev/sda1' failed (1)

Beitrag von menno »

Hallo,

erstmal vielen Dank für euern Feedback.

Ich habe
mkfs.vfat -F 32 /dev/sda
innerhalb des bootimages ausgeführt.
Das war der Befehl, der letztlich gescheitert ist

Code: Alles auswählen

[6] [Apr 08 12:55:51] Using encoding 'ANSI_X3.4-1968' (Posix.py|792)
[7] [Apr 08 12:55:51] >>> mkfs.fat 3.0.26 (2014-03-07) (Posix.py|836)
[7] [Apr 08 12:55:51] >>> mkfs.vfat: unable to open /dev/sda1: Device or resource busy (Posix.py|836)
Der Logfileeintrag und das Ergebniss auf der Console unterscheiden sich nicht substanziell.

Wie gesagt, reproduzierbar, per netboot-install und auf der Console im bootimage, war das Unvermögen von fdisk, ioctl() aufzurufen.
Ich musste kpartx -s /dev/sda händisch aufrufen.
Ich habe keine formatierungsversuche auf der Konsole vorgenommen.


1.) Versuch: aus dem bootlogfile
dd if=/dev/zero of=/dev/sda bs=512 count=1
Gescheitert mit der selben Fehlermeldung

2.) Versuch: wipedisk (von n.wenselowski)
Scheint shred zu sein, werde ich nach einem Durchgang abbrechen.
Auch hier wurde wieder Dateisystem LVM2_member, Typ c erkannt.
Die Festplatte war niemals mit einem LVM2 ausgestattet, sie war immer Teil eines Windows XP Systems.

Hat funktioniert!!!!
Ich habe keine Ahnung, warum und wieso, aber es läuft!

Vielen Dank für den Tipp, n.wenselowski

@m.radtke: ich habe mir winxppro 4.0.5-2 vorsichtshalber herunter geladen.

Vielen Dank für eure Hilfe, Ideen und Anmerkungen
Heiko

Nachtrag: mir ist eingefallen, dass die zwei Rechner kurzzeitig mit Linux liefen. Ich packe immer ein LVM auf die Platte
Antworten