The tiny BSD devil does not approve of me

X

xane

Guest
I have been tinkering with a FreeBSD setup on an old PC setup for a number of months, please bear with me on this sad story.

As I began with a 1.6Gb disk, it quickly filled up and I started running out of space when I wanted to use the larger applications like KDE. So I ordered a new 30Gb disk, it arrived, and after much research I formed a plan to transfer the /usr slice to the new disk.

Unfortunately this failed with some severe disk errors, on further examination the disk was found to have a large number of bad blocks, so back it went. Six weeks later the retailer eventually conceded that there was no suitable replacement and I got a refund, meanwhile the FreeBSD system had been gathering dust :(

So, I dug out an older 4Gb disk, started again, but managed to screw it up, and in a moment of madness erased the entire /usr tree trashing the system :eek:

I decided to reinstall, I wouldn't lose much as I could easily remember how I'd setup the original system and actually looked forward to going through it again, I did this and halfway through the machine died :eek:

Turned out to be a loose RAM stick, reseated and rebooted and restarted the install again. It completed fine but I discovered I'd left out the /usr/ports area, so I started to install that and it looked like it was doing a complete reinstall, so I rebooted to find my /bin directory missing :eek:

Install #3, with all the ports, completed fine - hurrah, now for some application loading on all that luvverly clean space, I started with samba and immediately started getting these messages;

ad1: WRITE command timeout ...

:eek:

Surely not another dud disk, this one has worked fine for years :(

So, two questions:

1. does anyone know how I can check for bad blocks on FreeBSD, the first dud disk I needed to load onto a Windows system and FDISK, FORMAT then SCANDISK.

2. I suspect, because I am using an old i440TX mobo, there may be a problem with the DMA on the disk and it has resorted to using PIO, I've seen several articles on it and I am considering a few solutions, but has anyone encountered this sort of problem ?

TIA
 
T

Testin da Cable

Guest
For IDE drives, any bad block is usually a sign of potential trouble. All modern IDE drives come with internal bad-block remapping turned on. All IDE hard drive manufacturers today offer extensive warranties and will replace drives with bad blocks on them.

If you still want to attempt to rescue an IDE drive with bad blocks, you can attempt to download the IDE drive manufacturer's IDE diagnostic program, and run this against the drive. Sometimes these programs can be set to force the drive electronics to rescan the drive for bad blocks and lock them out.

how about doing a low-level format of the drive? perhaps there's an fsck option that scans the drive for atomic errors, I have no idea.

as to the PIO/DMA thing. hdparm [iirc] is your friend. a kernel recompile may help out too. check out the GENERIC and LINT files somewhere deep in /usr/sys.

next time you forget /usr/ports or /usr/sys check out a handy prog called cvsup. that can help you pull the latest stuff off the interweb. then you can remake the world and the kernel [or rather the kernel and the world and end up with a spinky fresh system.

had some bad luck there matey. hope stuff works out for you :)
 
X

xane

Guest
I got a result last night, turned off the DMA on the drives and it works fine now :)

/boot/loader.conf add line hw.ata.ata_dma="0"
 
W

Will

Guest
:)

Hopefully if I look sympathetic, the good karma will help my Debian install go smoothly.
 
A

Ash!

Guest
Will, TDC & XANE. I am a bit of newbie ont his issue. What is Free BSD, KDE, DMA & PIO. Sorry for being a pain but you goes seem to know a lot about these things and I am trying to build my knowledge up

Ta
 
W

Will

Guest
Originally posted by blade07
What is Free BSD, KDE, DMA & PIO
  • FreeBSD - FreeBSD is an advanced operating system derived from BSD UNIX, the version of UNIX developed at the University of California, Berkeley.
  • KDE - A graphical desktop environment for Unix workstations.
  • DMA/PIO - Look here.
 
X

xane

Guest
I just realised I mentioned it was a TX mobo, it is in fact a i440BX (Pentium Slot One) - Abit BX6v2, one of the most stable pieces of hardware I ever pwned.
 
W

Will

Guest
But...but...you don't even play CS...*looks confused and scared*
 
X

xane

Guest
You know, I actually remember when Half-Life got released, I was playing in some Quake/Quake II league at the time.
 
X

xane

Guest
Heh, I've advanced in leaps and bounds and decided to install the KDE "meta port", it took around 10-12 hours to compile overnight and took up two smegging gigabytes !!!

KDE is so bloody smart, I can definitely see moving a lot of stuff to this machine, and even more amzing is how I can run multiple user sessions on a silly little 433Mhz Celeron, puts Windows to shame.
 
T

Testin da Cable

Guest
kde aer teh bloat!!1 minimalist all the way baby :D


















though tbh I'm running KDE3.x right now and it's way better than 2x :)
 
W

Will

Guest
I have a console.

Though I tried KDE 3 a few days ago, using my lovely Knoppix CD. I do approve.:)
 
X

xane

Guest
I want to move the CDRW and the Scanner onto it next, I hear that there is a nifty utility called "cdrecord" and plenty of KDE GUI front-ends for it, pls the Scanner has a TWAIN like interface called SANE.

Any comments or guidance on this would be appreciated.
 
T

Testin da Cable

Guest
cdrecord is tres cool. don't you dare use it with a gui :eek:
 
X

xane

Guest
Originally posted by Testin da Cable
cdrecord is tres cool. don't you dare use it with a gui :eek:

Hah, with the next chapter in this saga the GUI was the last thing I was worried about !

My CD-ROM and CD-RW are ATAPI IDE models, so problem #1 was that cdrecord (and others) only work with SCSI drives.

Not a problem as there is a device driver called "atapicam" that allows ATAPI CD drives to be emulated as SCSI (under the CAM system, check out "man camcontrol"), however now comes problem #2 in that "atapicam" is not in my generic kernel.

Not a problem as I just rebuild the kernel (er yeah right), however, problem #3 is that "atapicam" is not in my version of FreeBSD either, which is 4.7 installed from the ISO CDs last September, so it's all a recent invention having ATAPI CD-RW on the system, and the kernel rebuild fails.

Not a problem (sounds familiar) I just use cvsup to update the source tree and rebuild using make world, besides taking around 4 hours to do this it completes fine, I then manage to get "atapicam" in a rebuilt kernel and lo and behold I have 2 SCSI CD drives, one for the CD-ROM and one for the CD-RW.

Now problem #4 is that although cdrecord and all its little friends (cdda2wav, mkifofs, cdbakeoven) can see the fake SCSI drives okay, they don't seem to be working too well, none of them want to work with the CD-ROM drive, and when I use the CD-RW drive to read an audio CD some of the tracks come out funny (I checked them out by moving the WAV to my Windows machine and using WinAmp), problem is with cdda2wav, it's a bit hit and miss on the conversion.

Meanwhile, cdbakeoven (a pretty crap GUI for cdrecord) doesn't want to work at all with either drive, it can't get a track listing, so I try a new GUI called xcdroast and it tells me cdrecord is too old, so I go back to cvsup to update the ports tree this time, reinstall cdrecord (actually sysutils/cdrtools) and I've now got the shiney new cdrecord version 2.0 and it's working !

I started using xcdroast, which is a generic X-Windows GUI, it's actually tres good, and I ripped the audio CD successfully first time - yay !

Final problem #5 was i was fast running out of space on my 4Gb drive, the port tree now takes 1.6Gb even after trimming it by removing the crap stuff (ukrainian and vietnamese applications - wtf!), then I discover "make clean" and all the work files get erased and it's fine again :)

Go me, in one weekend I've advanced my mad FreeBSD skillz quite significantly, just from moving the CD-RW. Under Windoze it would've been so simple, but I wouldn't have learned much.
 

Users who are viewing this thread

Top Bottom