Page 1 of 1

IDE Only in Safe Mode

Posted: 07 Oct 2015 13:50
by RobertoBenzi
Hello there,
I'm trying to set up a NAS4free 10.2 x86 box with a Asus P5SMX-SE Mobo, an Intel Celeron 1,6 Ghz and 2 GB RAM, with a PCI 2X internalSATA+2eSATA Adapter and a PCI KR.X5 Network Adapter.
The system is installed on a 1 GB USB Stick with no Swap.
As soon as I connect any IDE drive the system hangs during boot, and I'm only able to start it in safe mode. I've tried 2 different drives, both on Slave and Master position, with 2 different cables (Rear pins are set on Cable Select), and even a CD drive, they works in Safe Mode, but as long as I use normal mode the system hangs on boot, just before "creating 2nd memory disk for x86".
Is there a way to start only IDE in safe mode, or any known other way to circumvent the problem?

The IDE I've tested with are pretty recent and capable, a WD 160BB and a 250GB Maxtor.

Would update the Bios do any good?

Re: IDE Only in Safe Mode

Posted: 07 Oct 2015 18:15
by b0ssman
128mb usb stick is to small. how did you get the minimal embedded install. which is 2gb on there?

Re: IDE Only in Safe Mode

Posted: 07 Oct 2015 22:17
by RobertoBenzi
Yeah, I checked, the USB flash drive size is 1GB, with two partition, a 808MB Partition (I guess it's for system) and a 175MB partition (Windows shows it as unpartitioned space, I'd exclude swap 'cause minimum is 512 and I installed without it, dunno what is this partition for), they were created by the system during the installation.

Edit: Dunno how could I get 2 GB embedded on it, I simply used the setup, may be using the x86 version causing the required space difference? Btw I'm gonna edit the first post to fix it, ty

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 08:12
by b0ssman

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 12:43
by RobertoBenzi
I will look further into this, but as far as I can see that's not related to the problem, 'cause I have the same issue (hanging on boot, unless booting in safe mode, when i connect any kind of IDE drive) even with liveCDs and LiveUSBs

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 13:04
by b0ssman
and booting a linux system works? then your system might just not work under freebsd.

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 14:44
by RobertoBenzi
To reply to things in the proper order:

I've just tried to install the exact same version (10.2 latest revision without swap) on a larger flash drive, same result. I've checked the patition table too, and it still creates a 808MB partition+2.2GB empty partition, so I'd feel comfortable assuming that the required minimum space for the x86 embedded without swap is 808MB, the 2 GB required space is due to the fact that the wiki doesn't make distinction between x86 and x64, and 2GB should be the minimum for 64bit embedded - i guess-.
Obviously the bigger size didn't solved the problem, as long as I enable IDE I'm only able to boot FreeNAS (both liveUSB/CD and install) in Safe Mode.

I've tried booting a Gparted Live USB and it boots flawlessly.

The system does work also under FreeBSD, cause it works even under NAS4Free, as I stated above as long as I boot in Safe Mode it doesn't freeze during boot and start the OS. Just to be sure I've just verified that even in Safe Mode both disks are detected and working via WEBGui. The problem is that to make it work I gotta start it in safe mode, and for a NAS that should run headless and without keyboard nor mouse is pointless having to press "3" every time I restart it. That is the problem that I wrote here to solve.

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 16:43
by raulfg3
my two penny:

- Do not use IDE Disk only SATA disk and boot from USB
- trash your motherboard and use a new one. How old is ? 7 years? (sis chipset are not well supported in BSD) https://www.asus.com/es/Motherboards/P5SMX_SE/

If still wants to try something; in BIOS sometimes you can configure IDE as legacy / enhaced or something simmilar, if possible, try to change and do a new boot test.

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 17:04
by b0ssman
omg SIS chipset. yeah no wonder its not working.

burn that thing. and bury the remains.

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 18:08
by daoyama
RobertoBenzi wrote:that the required minimum space for the x86 embedded without swap is 808MB, the 2 GB required space is due to the fact that the wiki doesn't make distinction between x86 and x64, and 2GB should be the minimum for 64bit embedded - i guess-.
2GB includes OS 800MiB + default swap of 1024MiB = 1.9GB.
the default swap will use while firmware upgrading, fsck etc.
However, usually you don't notice about it if you have enough free memory.


For safe mode, try this from System|Advanced|loader.conf:

hint.acpi.0.disabled = 1
hint.apic.0.disabled = 1

Also you may need to limit DMA mode?
hint.ata.X.mode

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 18:15
by RobertoBenzi
Not using IDE Disks would mean cutting out almost a third of my storage space, so I see it as a last resort.
Trashing my motherboard and buying a new one would kind of defeat the purpose of building a NAS out of old hardware I have laying around functioning and unused due to obsolence, so it's also not an option.

The post above arrived while I was writing, and I think that it kind of incorporate the solution :D

Btw I managed to find a post in the FreeBSD forum who suggested to edit /boot/loader.conf adding this lines (I report all the lines suggested for completeness, so in case someone in future experience a problem similiar but not identical to the one we're trying to solve could try the whole thing)
hint.acpi.0.disabled=1
hint.apic.0.disabled=1
hint.kbdmux.0.disabled=1
hw.ata.ata_dma=0
hw.ata.atapi_dma=0
hw.ata.wc=0
hw.eisa_slots=0

I started in Safe Mode and added all the lines above in System|Advanced|loader.conf.
Once I verified I could start in Normal Mode with those lines enabled I deleted them once at time, restarting and verifying the system being still able to boot. Apparently the one that allows me to boot is

hw.ata.ata_dma=0

When I delete this line the system start hanging on boot again.
Sadly I'm not enough tech-skilled to know what does this fix and mean, if someone of you could tell it to me, I'd be grateful.

I'd like to know if there's a way to do the same thing this line does in BIOS and if the change I made in loader.conf would be saved once I backup configuration (in case of future upgrade).

Lastly, among BIOS updates some version after mine says
"Fixed SATA HDD UDMA mode shown incorrectly under OS."
May this be related and so be good to upgrade the BIOS at least to that version?

p.s. about the SWAP in above post. With 2 GB RAM am I safe enough for firmware update? 'Cause I'd prefer to avoid the swap on USB, to prevent the Flash Drive from being burned in case it starts swapping.

Re: IDE Only in Safe Mode

Posted: 08 Oct 2015 18:32
by b0ssman
without dma mode your drivers will run horribly slow.

and yes try a bios update.

Re: IDE Only in Safe Mode

Posted: 09 Oct 2015 14:11
by RobertoBenzi
Updating the BIOS didn't help, it still hangs on boot, btw forcing MWDMA2 or lesser (or SWDMA) make it work, so it's definetly a UDMA problem, may the fact that the bios I updated to is the latest, and not the one with UDMA fix change anything?

May a reinstall help solving the problem now that the bios should have somehow improved the situation?

Re: IDE Only in Safe Mode

Posted: 09 Oct 2015 15:34
by raulfg3
RobertoBenzi wrote:May a reinstall help solving the problem now that the bios should have somehow improved the situation?
NO

Re: IDE Only in Safe Mode

Posted: 09 Oct 2015 19:29
by b0ssman
give openmediavault a try. it may have better sis support.