Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#7572 closed bug (fixed)

Unable to initialize BFS on usb disk

Reported by: Giova84 Owned by: stippi
Priority: blocker Milestone: R1/alpha3
Component: Applications/DriveSetup Version: R1/Development
Keywords: drivesetup initialize bfs usb sd hard disk Cc: starsseed@…
Blocked By: Blocking:
Platform: x86

Description

Since hrev41595 i am unable to initialize bfs on usb disks (usb ext. hard disks, usb sticks and SD cards) using DriveSetup (the "initialize" entry is grey when usb disk is selected). Before "r1a3" branch, i was able to initialize usb disks.

Attachments (7)

DiskSetup_Initialize.png (72.8 KB ) - added by taos 13 years ago.
Initialize unmounted USB disk.
DriveSetup_Initialize.png (72.8 KB ) - added by taos 13 years ago.
Initialize unmounted USB disk.
initialize_unselectable.jpg (126.7 KB ) - added by Giova84 13 years ago.
JetFlash.png (89.5 KB ) - added by taos 13 years ago.
DriveSetup: USB stick that can be initialized.
Syslog_Crossfire.txt (5.3 KB ) - added by taos 13 years ago.
Syslog excerpt for USB stick that can't be initialized.
Syslog_JetFlash.txt (8.2 KB ) - added by taos 13 years ago.
Syslog for USB stick that can be initialized.
Crossfire.png (80.5 KB ) - added by taos 13 years ago.
DriveSetup: USB stick that can't be initialized.

Download all attachments as: .zip

Change History (54)

comment:1 by taos, 13 years ago

Strange, with r1a3-rc-hrev41718, I can choose "Initialize" for unmounted SD cards in an usb card reader:

Initialize unmounted USB disk.

Only my microSD card currently mounted at /boot can't be initialized - and it wouldn't be advisable to do so with your running system.

by taos, 13 years ago

Attachment: DiskSetup_Initialize.png added

Initialize unmounted USB disk.

by taos, 13 years ago

Attachment: DriveSetup_Initialize.png added

Initialize unmounted USB disk.

comment:2 by Giova84, 13 years ago

I'm downloading hrev41759 (at the moment the last nightly) : once i've tried it out I will update the ticket.

comment:3 by Giova84, 13 years ago

With r1a3-rc-hrev41759 the bug is still here: if I select any kind of usb disk in DriveSetup (obviously the disk is previously unmounted) the voice "initialize" is gray, unselectable.

A photo as attachment.

by Giova84, 13 years ago

Attachment: initialize_unselectable.jpg added

comment:4 by taos, 13 years ago

Tried again with r1a3-rc-hrev41759. All SD cards and USB sticks with FAT32, ext4 and Be File System still show - as soon as unmounted - the option "Initialize" (even if the write protection is on). Only difference I can see at the moment is the file system: I don't have any SD cards formatted with NTFS lying around that I could test - and all my windows style formatted USB sticks and SD cards show at least one partition.

comment:5 by Giova84, 13 years ago

On all my SD cards (three) i have the write protection set on off. I've tried to format these cards in FAT32, exFAT and NTFS, but i can't initialize them in BFS, inside Haiku. This is reproducible in my two computers.

With previous version of Haiku (before Alpha 3 branch) i was able to initialize them in BFS.

Last edited 11 years ago by mmadia (previous) (diff)

comment:6 by taos, 13 years ago

Could this problem be hardware related?

I've just had a really silly idea, extremely unlikely because you've tried with two different computers and you can read your usb disks - but did these problems start when IO-APIC was enabled by default? There are a few users experiencing problems with usb devices since then. On the other hand, the problems with usb mice were fixed with hrev41759.

comment:7 by Giova84, 13 years ago

With the IO-APIC disabled (via optional boot menu) the issue is still present.

In an old Haiku installation (an Alpha2 nightly) i have initialized an SD card with BFS, so, after this, i have booted hrev41759. In this way (SD card formatted as BFS inside Alpha2) i have the "initialize" command active inside Alpha3!

Last edited 11 years ago by mmadia (previous) (diff)

comment:8 by Giova84, 13 years ago

So, with the last releases of testing Alpha 3, seems that i cannot initialize the usb disks formatted in NTFS, FAT32 and exFAT.

comment:9 by taos, 13 years ago

After a little more experimenting, I've also found one fat32 usb stick that can't be initialized. It's a 2 GB Sandisk Cruzer Crossfire without a partition (/dev/disk/usb/x/0/raw, x = 0, 1, 2 etc). Except for this one, all my other usb storage devices formatted with FAT32 are identified as device /dev/disk/usb/x/0/raw with partition /dev/disk/usb/x/0/0, x = 0, 1, 2 etc).

Seems Alpha 3 doesn't like usb disks without Intel Partition Map - except if formatted as BFS, of course.

comment:10 by stippi, 13 years ago

Milestone: R1R1/alpha3
Priority: normalblocker

This qualifies as blocker.

comment:11 by starsseed, 13 years ago

@Giova84
Your disk device is initialized with a Be File system. So It certainly have the 0x55AA MAGIC NUMBER present at the end of the first block of every bootable volume. (it does not write the MBR)

The Intel partitioning system check for this 'flag' and do not initializes a partitioning system if it is present on the disk (to avoid the overwrite of the partition table).

Also the fs-sniffer find the BFS signature in the second sector (even if you install an empty MBR).

So:
Write zeros to the firsts 1024 bytes of your disk device(use dd or DiskProbe), then reboot.
You should be able to create a partitioning system and a BFS partition onto it. (don't forget to create an "ACTIVE" one!).
Also you'll may have to write a working MBR boot code if you want to boot on your "live-USB" key (you can find one on the haiku-anyboot-image or in the ticket #3441 ).

Last edited 13 years ago by starsseed (previous) (diff)

comment:12 by starsseed, 13 years ago

Cc: starsseed@… added

comment:13 by Giova84, 13 years ago

@starsseed

Yes, i know this method, but i can do it easily from my installation of Haiku Alpha2, initializing the disk with Drive Setup. And for boot on of my USB key with Haiku r1a3, I simple install it on USB, via Haiku's Installer (USB disk initialized inside Alpha2)

comment:14 by stippi, 13 years ago

It doesn't really matter whether there are workarounds to the problem. It should work from DriveSetup in the first place and it's also clearly a regression compared to Alpha2.

That being said, I have no idea what change may have caused this. On top of that I have probably no time to look into it.

in reply to:  14 comment:15 by Giova84, 13 years ago

Replying to stippi:

It doesn't really matter whether there are workarounds to the problem. It should work from DriveSetup in the first place and it's also clearly a regression compared to Alpha2.

That being said, I have no idea what change may have caused this. On top of that I have probably no time to look into it.

I'm completely agree with you.

in reply to:  6 ; comment:16 by mmlr, 13 years ago

Replying to taos:

I've just had a really silly idea, extremely unlikely because you've tried with two different computers and you can read your usb disks - but did these problems start when IO-APIC was enabled by default? There are a few users experiencing problems with usb devices since then. On the other hand, the problems with usb mice were fixed with hrev41759.

Apart from this making no sense (and it's not "USB mice" being fixed, but a very specific interrupt non-routing causing an interrupt overlap with a USB controller and therefore the ports routed to it not working): What "a few users" are you talking about? Please redirect them onto this bug tracker and make sure that such problems get logged in new tickets! I am not aware of any such problems, so I really need to have those reports. Thanks.

in reply to:  13 ; comment:17 by starsseed, 13 years ago

Replying to Giova84:

Yes, i know this method, but i can do it easily from my installation of Haiku Alpha2, initializing the disk with Drive Setup.

Are you sure ? for my own, I don't remember that I ever been able to initialize an Intel partitioning system over a BFS formated disk...

edit:
yes: even if it's not not a regression, we should be able to do that.

Last edited 13 years ago by starsseed (previous) (diff)

in reply to:  17 comment:18 by Giova84, 13 years ago

Replying to starsseed:

Are you sure ? for my own, I don't remember that I ever been able to initialize an Intel partitioning system over a BFS formated disk...

I can initialize an Intel partitioning system as Be File System, inside Haiku, as i've said. You can verify by your own.

Last edited 11 years ago by mmadia (previous) (diff)

comment:19 by tonestone57, 13 years ago

This might relate to BFS, DriveSetup or USB changes. I know Michael was doing some USB changes I think for Alpha 3. Not sure if the other two were changed.

If this only happens to you (or a few others) then I would guess USB changes which is more likely to affect certain computer hardware. BFS & DriveSetup would affect everyone and we would all see this issue. I have to test to see for myself.

Please upload:

(1) syslog - will help see if any hardware issues and
(2) listdev output (listdev > listdev.txt)

1) is really important but 2) helps also. These can provide more clues of what is happening on your computer to fix the issue.

in reply to:  19 comment:20 by mmlr, 13 years ago

Replying to tonestone57:

This might relate to BFS, DriveSetup or USB changes. I know Michael was doing some USB changes I think for Alpha 3. Not sure if the other two were changed.

If this only happens to you (or a few others) then I would guess USB changes which is more likely to affect certain computer hardware. BFS & DriveSetup would affect everyone and we would all see this issue. I have to test to see for myself.

No that really makes no sense at all. There were no USB changes related to usb_disk but only to the controllers. However if the controllers were failing then no USB disk access would work, you couldn't read or write anything to the USB device and it'd KDL after a while.

comment:21 by tonestone57, 13 years ago

Relax Michael. Just a guess on the limited info given. =)

Maybe more clues and better idea once we get his syslog & listdev.

Also, I assume initialize works for his non-USB drives according to the description he gave but not really sure. "i am unable to initialize bfs on usb disks (usb ext. hard disks, usb sticks and SD cards) using DriveSetup (the "initialize" entry is grey when usb disk is selected). Before "r1a3" branch, i was able to initialize usb disks."

Giova84, does that mean you can still initialize PATA or SATA drives in your computer?

EDIT here. See post below for details.

Last edited 13 years ago by tonestone57 (previous) (diff)

comment:22 by tonestone57, 13 years ago

I retested DriveSetup and I am having somewhat similar issue.

If I choose the entire internal hard drive or entire usb key then initialize shows up for me. If I select a specific partition on any drive (internal or usb) then initialize does not work. Happens on hrev41759. Partitions are FAT32, NTFS or EXT3.

Giova84 uploaded an image where he selects the entire usb drive and that does not work for him (no initialize) but that actually works for me. Slightly different effect for me. I can initialize whole drives but not partitions with DriveSetup.

I tried using all the safe-options and still same thing.

comment:23 by tonestone57, 13 years ago

Ok, I checked the DriveSetup revision log and narrowed it down. Then I downloaded 3 images from Haiku files, tested and found that the issue is between hrev39173 (not working) and hrev39021 (working).

Only change in DriveSetup log is hrev39115.

I believe this change is the cause for initialize not working on partitions for me. This may also fix problem for original poster but not sure.

Please fix or revert changes back. Thanks.

in reply to:  16 comment:24 by taos, 13 years ago

Replying to mmlr:

Apart from this making no sense (and it's not "USB mice" being fixed, but a very specific interrupt non-routing causing an interrupt overlap with a USB controller and therefore the ports routed to it not working): What "a few users" are you talking about? Please redirect them onto this bug tracker and make sure that such problems get logged in new tickets! I am not aware of any such problems, so I really need to have those reports. Thanks.

First, I'm sorry. I didn't want to jump to conclusions - I've already mentioned that I thought it was very unlikely that the problem was related to recent IO-APIC changes. And you are right, of course, ticket #7520 isn't about a non-working usb mouse, I only referred to it this way because the initial reporter named the ticket "USB mouse can't work when IO-APIC is enabled". I'll try to be more precise the next time. The problems a few users seemed to experience are either reported on bug tracker and have already been taken care of or have resolved for one reason or another. So, nothing to worry about in this regard.

But back to the initialization problem: I now think it's in no way related to computer hardware (and especially usb controllers) - I've experienced the reported problem only with one usb storage device (out of 15), an usb stick that was pre-formatted in an unusual way. All standard fat32 disks (no matter if formatted by linux or windows) show a partition structure (e.g. /dev/disk/usb/0/0/0, linux style: /dev/sda1) and can be initialized by the latest alpha3 rc when the entire disk (/dev/disk/usb/0/0/raw, linux: /dev/sda) is chosen. The one odd usb stick shows a structure like a bfs disk without seperate partitions (only /dev/disk/usb/0/0/raw) and can't be initialized.

comment:25 by taos, 13 years ago

I've added syslog excerpts for:

1.) an usb stick ("JetFlash", volume is named pkback# 001) that can be initialized ("Syslog_JetFlash.txt")

DriveSetup: USB stick that can be initialized.

2.) an usb stick ("Crossfire") that can't be initialized ("Syslog_Crossfire")

DriveSetup: USB stick that can't be initialized.

I was using r1a3-rc-hrev41789.

by taos, 13 years ago

Attachment: JetFlash.png added

DriveSetup: USB stick that can be initialized.

by taos, 13 years ago

Attachment: Syslog_Crossfire.txt added

Syslog excerpt for USB stick that can't be initialized.

by taos, 13 years ago

Attachment: Syslog_JetFlash.txt added

Syslog for USB stick that can be initialized.

by taos, 13 years ago

Attachment: Crossfire.png added

DriveSetup: USB stick that can't be initialized.

comment:26 by korli, 13 years ago

Please check hrev41842 on trunk.

in reply to:  26 ; comment:27 by taos, 13 years ago

Replying to korli:

Please check hrev41842 on trunk.

I'm now able to initialize the one usb stick that I couldn't initialize before. But I can still only choose "Initialize" for partitions on my (IDE) hard disk that are already formatted as BFS (or linux swap).

in reply to:  27 comment:28 by tonestone57, 13 years ago

Replying to taos:

But I can still only choose "Initialize" for partitions on my (IDE) hard disk that are already formatted as BFS (or linux swap).

Ok, that seems like same issue I reported up in comments 22 & 23 above. I noticed the same thing using physical drive in Virtualbox. I no longer build images & cannot test changes in trunk.

in reply to:  27 comment:29 by korli, 13 years ago

Replying to taos:

I'm now able to initialize the one usb stick that I couldn't initialize before. But I can still only choose "Initialize" for partitions on my (IDE) hard disk that are already formatted as BFS (or linux swap).

I think you have to delete the partition and create another one: if the partition type is FAT32, it won't propose to initialize as BFS.

comment:30 by scottmc, 13 years ago

Resolution: fixed
Status: newclosed

I just tried with hrev41857 and it's working again. This same PC and USB drive failed prior to the recent fixes being added. Closing this as fixed.

comment:31 by taos, 13 years ago

Not sure if this problem is really fixed - at least not for the alpha3 branch. I've tried both r1a3-rc-hrev41884 and DriveSetup from hrev41932 (trunk). My USB stick still can't be initialized - the changes in hrev41842 that solved the problems for this USB stick were reverted with hrev41845. Moreover, it's not possible to delete and recreate an partition on this USB stick. Maybe this ticket should be reopened?

comment:32 by mmadia, 13 years ago

Version: R1/alpha3R1/Development

R1 Alpha 3 has not yet been released. This was with an R1 Alpha 3 Release Candidate image.

comment:33 by korli, 13 years ago

Resolution: fixed
Status: closedreopened

Unless I miss something, it's not fixed.

comment:34 by scottmc, 13 years ago

Yeah, I tried again with 2 other USB devices and neither of those are working. So I have one out of three that works, all 3 are different brands.

comment:35 by Giova84, 13 years ago

I can confirm: the issue is still present.

comment:36 by stargatefan, 13 years ago

just being nosy, do these usb disk have floppy boot img on them ?

Last edited 13 years ago by stargatefan (previous) (diff)

comment:37 by taos, 13 years ago

I only have one affected device (out of 20) - it's a 2 GB Sandisk Cruzer Crossfire with U3 functionality (that I've never used). As far as I remember, these usb sticks were pre-formatted in a certain way to emulate a CD-ROM drive. Unfortunately, I can't remember if I have ever formatted this usb stick myself.

comment:38 by bonefish, 13 years ago

Please check with hrev42142 (trunk) or later.

in reply to:  36 comment:39 by Giova84, 13 years ago

Replying to stargatefan:

just being nosy, do these usb disk have floppy boot img on them ?

These usb disks, as mentioned several times in this ticket, "have" the filesystem FAT32, NTFS and exFAT on them. Nothing about floppy.img

in reply to:  38 comment:40 by Giova84, 13 years ago

Replying to bonefish:

Please check with hrev42142 (trunk) or later.

At the moment the last available version on http://haiku-files.org/cd/ is hrev42126

in reply to:  38 comment:41 by taos, 13 years ago

Replying to bonefish:

Please check with hrev42142 (trunk) or later.

With DriveSetup from hrev42178 (trunk), my USB stick (Sandisk Cruzer Crossfire) can be initialized.

comment:42 by bonefish, 13 years ago

Thanks, taos! Just to avoid confusion, one of my changes doesn't have made it into the alpha branch yet (currently latest pre-build version hrev42159), so it doesn't help to test with alpha branch images yet. I hope it gets there soon.

comment:43 by pulkomandy, 13 years ago

Sorry, I just missed it somehow...

Should be in alpha images from 42190 on.

comment:44 by scottmc, 13 years ago

with hrev42190 it's working ok for me again. I'll let others verify as well before we close it out though.

comment:45 by akw, 13 years ago

My SSD was affected by this problem. I just re-tested with hrev42190 and everything is working fine again.

Thanks.

comment:46 by taos, 13 years ago

Tested again with alpha3. "Initialize" can be chosen from menu when my usb stick is plugged in. So, works for me. Should this ticket be closed as fixed?

comment:47 by bonefish, 13 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.