[ag-automation] Problem reading RBF filesystem on SCSI disk
Piotr Czepek
piotr.czepek at gmail.com
Tue Oct 2 12:58:51 CEST 2007
2007/3/30, Carsten Emde <Carsten.Emde at osadl.org>:
> Piotr,
>
> another possibility is that the generic SCSI layer is buggy. In the file
> drivers/scsi/sd.c there is - around line 400 - a section that reads:
>
> if (sdp->sector_size == 1024) {
> if ((block & 1) || (rq->nr_sectors & 1)) {
> printk(KERN_ERR "sd: Bad block number requested");
> return 0;
> } else {
> block = block >> 1;
> this_count = this_count >> 1;
> }
> }
>
> Please insert
>
> if (sdp->sector_size == 256) {
> block = block << 1;
> this_count = this_count << 1;
> }
>
> prior to the above section, recompile the kernel and check it out.
> Maybe, this fixes the problem.
>
> cbe
>
Hello,
I found a workaround to read 256-Byte/sector SCSI hard disk.
The trick is to use sg_dd with blk_sgio=1 option.
(sg_dd is part of genooto's sys-apps/sg3_utils package)
When blk_sgio is set to 1, block devices are assumed to accept the
SG_IO ioctl and SCSI commands are issued for IO.
Issuing command:
sg_dd if=/dev/sda of=/tmp/dump.img blk_sgio=1 bs=256
dumps proper disk image.
Now I cant mount disk image via loop:
mount -o loop -t rbf /tmp/dump.img /mnt/os9 -o sector=256
Not a real solution, but it works for me ;-)
--
best regards
piotr czepek
More information about the ag-automation
mailing list