Subject: Re: Installation in IDEFS

From: Mark Seaborn <[email-masked]>
Date: Mon, 1 Feb 1999 17:34:54 +0000 (GMT)

In <URL:news:local.armlinux> on Sun 31 Jan, Andy Piper wrote:

[snip]
> I've had huge problems getting the drive initialised with an Ext2fs
> filesystem. !PartMan didn't want to know the drive initially due to the
> IDEFS partition information on it. After scrubbing various parts of the
> disc map with a disc editor I got ADFS back to thinking it was
> unformatted, but the only way to format it is to use the program which
> came with the card... which essentially just writes more IDEFS information
> onto it.

You do want ICS-type IDEFS partitions on your hard disc, so that isn't a
problem (otherwise you can't have Filecore partitions on the same disc). 
Are you using the latest alpha version of PartMan (from the ftp site)?

> At one stage I thought I'd succeeded in creating the right partitions, but
> once I started the ARM Linux install (following Paul Vigay's instructions)
> it became apparent that the partitions weren't formatted correctly at all.

PartMan doesn't do any formatting; it just creates a partition table.  The
install program should create an ext2 filesystem on the partition.

If you're following Paul Vigay's instructions to the letter (of the copy
I've got, anyway), they won't work with an ICS/Baildon interface.  You need
to supply the right magic numbers to mknod.  The install program should be
able to do this for you -- if you say yes when it asks you if you want to
create a filesystem on /dev/hdcX (where X is your partition number), does it
work?

-- 
         Mark Seaborn
  - [email-masked] - http://www.argonet.co.uk/users/mseaborn/ -
 
           So foul and fair a tagline I have not seen.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: "D. Odhams" <[email-masked]>
Date: Mon, 01 Feb 1999 23:37:50 +0100

Andy Piper wrote:
> 
> [Oops - my first attempt at posting this seems to have gone to
> the wrong address. Sorry, Russell]
> 
> I've been 'lurking' on this list for a while now without
> contributing, so I guess the first thing to do is say "hi". You
> all seem to be discussing pretty low-level coding / conversion
> issues, so I'm hoping what I want to ask isn't too simple!
> 
> A bit of background. I run Linux (heavily modified RH 5.1) on my
> Intel box, and use HP-UX and AIX (plus NT - sigh!) at work. What
> I really want to do is to install ARMLinux on my SA Risc PC. I
> have the default 500Mb ADFS hard drive (almost full), plus a
> CD-ROM drive, on the motherboard IDE interface. Last year I added
> an APDL/Baildon Electronics IDE card, with a 2.1 Gb hard drive,
> and so far I've not really been using it as much as I expected
> to. So, once I felt more confident with Linux in general, I
> cleared the drive, and decided to install ARM Linux from the Clan
> CD.
> 
> Around Christmas I enquired on the Acorn newsgroups and
> established that it should be possible to install to a drive on
> an expansion card, - /dev/hdc in this case - and I was pointed in
> the direction of you friendly, knowledgeable types for more
> information.
> 
> I've had huge problems getting the drive initialised with an
> Ext2fs filesystem. !PartMan didn't want to know the drive
> initially due to the IDEFS partition information on it. After
> scrubbing various parts of the disc map with a disc editor I got
> ADFS back to thinking it was unformatted, but the only way to
> format it is to use the program which came with the card... which
> essentially just writes more IDEFS information onto it. At one
> stage I thought I'd succeeded in creating the right partitions,
> but once I started the ARM Linux install (following Paul Vigay's
> instructions) it became apparent that the partitions weren't
> formatted correctly at all.
> 
> So - the 1 million Euro question - can I create the necessary
> Linux partitions and install to this drive? I don't especially
> want to go dismantling things, and move the extra hard drive to
> where the CDROM drive currently is (although I realise that that
> might give the CD drive better performance...!) - primarily
> because I'm not sure I can juggle things so that the various
> cables can reach to the new places.
> 
> Thanks for any advice.
> 
> --
> Andy Piper                    [email-masked]
> Fareham, Hampshire

I have a similar configuration with a second drive (hdc) on an ICS/baildon
card in my RPC 600. The problem I had was that it proved impossible to create
the Linux partition table with any version of Partman.

The solution was to write a small basic program to delete sector 0 (removing
the ICS start and size records for multiple 'logical' drives) and to write an
empty Linux partition table. The program, heavily copied from parts of other
peoples code, is attached. I make no guarantees to its correctness but I
believe it is safe to use if the prompts are followed correctly. 

Having fixed that, Partman is used to add the Linux native and swap partitions
and the rest of the installation can proceed normally but painfully compared
with a Red Hat install on a PC. 

The method, if I remember, is this:

Follow the Phil Norman method for installation from the Clan CD except:

a) Reformat your drive with the appropriate ICS/Bialdon tool to the size you
need for the ADFS partition alone making a note of the last ADFS cylinder
number and the total number of cylinders, b) Use my program to initialise the
linux partition table - partition '2',c) Create the remaining linux partitions
native '2' and swap '3' with Partman.

The parameters for mknod have to change, and the 3 lines after, as follows:

mknod /dev/hdc3 b 22 3
mke2fs /dev/hdc3
mkdir hd
mount -t ext2 /dev/hdc3 hd

[the mknod syntax is 
mknod [options] filename {bcu} major minor

where 'b' in our case is for a 'b'lock file
major is 22 for ide1 (3 for ide0 to which hda is attached)
minor as decribed by Phil Norman - 3 in this case.]

After the Phil Norman instal I hit a couple of problems as I remember and here
you need to have the FAQ at hand:

1/ I had the >24MB DRAM problem. Solution download the latest modules package
(modules-2.0.0-5a3.arm.rpm or later). Best do this before installation ideally.
2/ I had the 'invalid bmap magic' problem - follow the FAQ here.

Hope this helps.

------
David Odhams on 1 Mac plus 1 RPC600.

---

From: Matthew Pollard <[email-masked]>
Date: Tue, 2 Feb 1999 09:35:19 +0000 (GMT)

> 2/ I had the 'invalid bmap magic' problem - follow the FAQ here.

Would this work with simtec's idefs card?

just curious,

matt

Email: [email-masked]

---

From: John Joyce <[email-masked]>
Date: Tue, 2 Feb 1999 12:15:44 +0000 (GMT)

Hi,

Thanks David for the IDEFS instructions. I had spent ages trying to figure
out why PartMan refuses to play with IDEFS disks - in the end I went back
to the internal interface. Oddly enough a disk formatted by ADFS and then
attached to the Baildon card still wouldn't play with PartMan at which
point I gave up!! I suppose the solution is to find why PartMan won't talk
to IDEFS.

regards

John Joyce

---

From: Russell King <[email-masked]>
Date: Tue, 2 Feb 1999 13:16:07 +0000 (GMT)

> point I gave up!! I suppose the solution is to find why PartMan won't talk

Has anyone been trying the Alpha Partition Managers?  If so, I haven't
really had any feedback on them, and as such no work has been done on
them for about 4 months or so now.

The Alpha Partition managers purposely have the writeback of the
edited partition information switched off so that you don't go corrupting
your hard drives (maybe this is a mistake, but I thought that it might
mean that more people would be willing to try it).

Anyway, if you could try the /latest/ Alpha PartMan out, and detail the
structure you're trying to create on your drive (along with how you
created it), and then email this and the debug file (Pipe:$.C_Debug)
as described in the Debug Info window, then I'll see about enabling
the various other bits so that there is a fully working PartMan available.

--
Russell King ([email-masked])
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: John Joyce <[email-masked]>
Date: Tue, 2 Feb 1999 20:41:49 +0000 (GMT)

> them for about 4 months or so now.

I'd been following the link on the download page under 'partition manager'
which says 'the archive partman.arc [...] is ALPHA' rather than the alpha
release link on the main page. Anyway having complained I thought I'd
reinstall from scratch and try Baildon IDEFS out.

With the drive as previously setup (ADFS 480Mb, Linux 520Mb ish) connected
to the Baildon interface PartMan can't work out the format for itself;
told it's Filecore/Linux it produces:
Partition 1  Start 0  End -1  Size 97152MB  Type Filecore
Partition -  Start 0  End 2116799  Size 1034MB  Free

So I guess that isn't going to work, empty my disk onto mag-opts, blank
disk completely with ADFS_DiscOp and reformat with Baildon IDEForm. 
Exactly the same except that the end of the free space is now c. 1000000
as I formatted to a single IDEFS partition of 490Mb. Looking at the start
of the disk there appears to be the partition table present but PartMan
doesn't recognise it. 

Clues anyone? (output from PartMan attached)

thanks

John Joyce
þ*** Debug session started from ýPartMan
ÿIDEFS::4
part_open(dev_name=IDEFS::4, part_scheme=)
  blkio_open(IDEFS::4)
    -filesystem 'IDEFS' drive '4'
    -swis: DescribeDisc 0x61FC5, DiscOp 0x61FC0, SectorOp 0x61FCA
    -swis: ControllerType 0x00000, IDEUserOp 0x00000
    -disc_record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
    -geometry: [secsz=512, sec/tk=63, hds=16, cyls=1000]
    -new disc record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
  ret=0001f820
  eesox_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d270 0x7 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DF601 r2=0x80000007 r3=0001d270 r4=0x200]
    ret=0
  ret not detected
  icside_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d26c 0x0 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DF601 r2=0x80000000 r3=0001d26c r4=0x200]
    ret=0
  ret not detected
  powertec_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d26c 0x0 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DF601 r2=0x80000000 r3=0001d26c r4=0x200]
    ret=0
  ret not detected
  fcl_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d268 0x6 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DF601 r2=0x80000006 r3=0001d268 r4=0x200]
    ret=0
  ret not detected
  riscix_detect()
  ret not detected
  pcbios_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d274 0x0 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DF601 r2=0x80000000 r3=0001d274 r4=0x200]
    ret=0
  ret not detected
  blkio_close()
  ret=NULL
ret=00000000
IDEFS::4
part_open(dev_name=IDEFS::4, part_scheme=ICSIDEFS)
  blkio_open(IDEFS::4)
    -filesystem 'IDEFS' drive '4'
    -swis: DescribeDisc 0x61FC5, DiscOp 0x61FC0, SectorOp 0x61FCA
    -swis: ControllerType 0x00000, IDEUserOp 0x00000
    -disc_record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
    -geometry: [secsz=512, sec/tk=63, hds=16, cyls=1000]
    -new disc record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
  ret=0001f820
  icside_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d26c 0x0 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DCD01 r2=0x80000000 r3=0001d26c r4=0x200]
    ret=0
  ret not detected
  icside_readinfo()
    blkio_read(0001d264 0x0 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DCD01 r2=0x80000000 r3=0001d264 r4=0x200]
    ret=0
  ret error
  blkio_close()
  ret=NULL
ret=00000000
IDEFS::4
part_open(dev_name=IDEFS::4, part_scheme=Filecore/Linux)
  blkio_open(IDEFS::4)
    -filesystem 'IDEFS' drive '4'
    -swis: DescribeDisc 0x61FC5, DiscOp 0x61FC0, SectorOp 0x61FCA
    -swis: ControllerType 0x00000, IDEUserOp 0x00000
    -disc_record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
    -geometry: [secsz=512, sec/tk=63, hds=16, cyls=1000]
    -new disc record: [secsz=512, sec/tk=63, hds=16, ds=0x000000001EC30000 drv=4]
  ret=0001f820
  fcl_detect()
    blkio_setblocksize(512)
    ret=512
    blkio_read(0001d268 0x6 +0x1)
      -blocksize=0x200
      -sectorop: [r1=0x7DA401 r2=0x80000006 r3=0001d268 r4=0x200]
    ret=0
  ret not detected
  fcl_readinfo()
    part_add(parn=1, pinfo=[bs=0x0, be=0xFFFFFFFF, type=0x100])
      part_updatechs([bs=0x0, be=0xFFFFFFFF, type=0x100])
        blkio_getgeometry()
        ret=[sector_size=512, sectors=63, heads=16, cylinders=1000]
        start=[C=0,H=0,S=0] end=[C=4260880,H=4,S=3]
      ret ok
    ret ok
  ret ok
ret=0001f6d8
part_getgeometry()
  blkio_getgeometry()
  ret=[sector_size=512, sectors=63, heads=16, cylinders=1000]
ret ok
partition_interprettable()
  part_getpartinfo(parn=0)
  ret ok, pinfo=[bs=0x0, be=0x0, type=0x0]
  part_getpartinfo(parn=1)
  ret ok, pinfo=[bs=0x0, be=0xFFFFFFFF, type=0x100]
  part_validops(parn=1)
    fcl_validate_change(parn=1)
    ret invalid
    fcl_validate_deletion(parn=1)
    ret invalid
  ret 0
  part_getpartinfo(parn=2)
  ret error
ret ok
partition_new(1)
  part_allocate(pinfo=[bs=0x0, be=0xF617F, type=0xFFFFFFFF])
    fcl_allocate()
    ret 3
    fcl_validate_partno(parn=3)
    ret valid
  ret=3 (kern_part_no=3)
ret 
partition_createpartition(1)
  part_create(parn=3, pinfo=[bs=0xF6180, be=0x1EC6EF, type=0x83])
    part_updatechs([bs=0xF6180, be=0x1EC6EF, type=0x83])
      blkio_getgeometry()
      ret=[sector_size=512, sectors=63, heads=16, cylinders=1000]
      start=[C=1000,H=0,S=0] end=[C=2000,H=15,S=62]
    ret ok
    fcl_validate_partno(parn=3)
    ret valid
    fcl_validate_creation(parn=3)
      checking [0xF6180-0x1EC6EF] with [0x0-0xFFFFFFFF]
    ret invalid
  ret=0
ret error
partition_createpartition(1)
  part_create(parn=3, pinfo=[bs=0xF6180, be=0x1EC6EF, type=0x83])
    part_updatechs([bs=0xF6180, be=0x1EC6EF, type=0x83])
      blkio_getgeometry()
      ret=[sector_size=512, sectors=63, heads=16, cylinders=1000]
      start=[C=1000,H=0,S=0] end=[C=2000,H=15,S=62]
    ret ok
    fcl_validate_partno(parn=3)
    ret valid
    fcl_validate_creation(parn=3)
      checking [0xF6180-0x1EC6EF] with [0x0-0xFFFFFFFF]
    ret invalid
  ret=0
ret error
partition_createpartition(1)
  part_create(parn=3, pinfo=[bs=0xF6180, be=0x1EC6EF, type=0x83])
    part_updatechs([bs=0xF6180, be=0x1EC6EF, type=0x83])
      blkio_getgeometry()
      ret=[sector_size=512, sectors=63, heads=16, cylinders=1000]
      start=[C=1000,H=0,S=0] end=[C=2000,H=15,S=62]
    ret ok
    fcl_validate_partno(parn=3)
    ret valid
    fcl_validate_creation(parn=3)
      checking [0xF6180-0x1EC6EF] with [0x0-0xFFFFFFFF]
    ret invalid
  ret=0
ret error

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 2 Feb 1999 21:28:20 +0000 (GMT)

> reinstall from scratch and try Baildon IDEFS out.

Erm, the one on the main page has been gone for months.  Could you let me
know which version (it should appear in the title bar of the main window)
you've got?

> Partition -  Start 0  End 2116799  Size 1034MB  Free

Did PartMan read this correctly when it was connected to the internal IDE?

> of the disk there appears to be the partition table present but PartMan

Any chance of a dump of the first sector please?
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: John Joyce <[email-masked]>
Date: Tue, 2 Feb 1999 21:51:08 +0000 (GMT)

> know which version (it should appear in the title bar of the main window)

I'd previously set up with 1.11 as currently pointed at by URL
http://www.arm.uk.linux.org/armlinux/downloading.html#partman
(which says it's the alpha version) with the drive on the internal IDE.

The one from the other url (.../armlinux/alphasw.html) is 1.13a7 [dev].

> Did PartMan read this correctly when it was connected to the internal IDE?

1.11 worked fine with the internal IDE when I originally installed but
wouldn't play with the Baildon. I've not tried 1.13a7 back with the
internal.

> Any chance of a dump of the first sector please?

Attached.

regards

John Joyce

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 2 Feb 1999 22:48:39 +0000 (GMT)

> The one from the other url (.../armlinux/alphasw.html) is 1.13a7 [dev].

There is a 1.13a8 on the FTP site (I didn't point the URL at it because I think
it lies on it's start up screen as to what's enabled).

I've just tried that file on my linux fdisk (which uses the same code), and it
recognises it.  I think 1.13a8 may be worth a try.  If it doesn't recognise
the ICS IDEFS, then I think it dumps out the sector in the log file.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Dave Baukus <[email-masked]>
Date: Tue, 02 Feb 1999 18:05:42 -0600

Any clues as to why when I access the PCI config 0 space (virt:0xf8000000,
real: 0x7b000000) the system locks up.

I'm on an ebsa285.

I access the config space as follows (I also hang in when scan_bus calls
pcibios_read_cfgbyte()). The following code is my attempt to isolate the
hang in pci_scanbus()

ulong   pci_cfg0_base = 0xf8000000;
ulong   *p2;
ulong   *p1;

for (i = 0; i < 16; i++)
{
 	 p1 = (ulong *)(pci_cfg0_base + (256 << i));
         printXX("pci %x %x \n", i, *p1);
}

Using a logic analyser I can see that address 0xc0007e00 is accessed and then
address 0x100 and the she's dead in the water.

0x7e00 is the translation entry for 0xf800000 to 0x7b000000. It looks good:

the translation table entry is:
		0xc0007e00: 0x7b000442    0xc0007e04: 0x7b100442 

--
Dave Baukus
	Inet Inc. - R & D
	[email-masked]
	(972) 578 - 3930

---

From: Philip Blundell <[email-masked]>
Date: Wed, 03 Feb 1999 10:18:51 +0000

>real: 0x7b000000) the system locks up.

Stupid question first: have you remembered to un-reset the PCI bus?

p.