16 February 2013, 19:30 | #1 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,333
|
How to find Exec device name and unit number for boot drive
I'm going to (try to) put together a custom "combo" CD image which auto-boots on any Amiga with a SCSI controller, as well as CDTV/CD32.
To do that I'll create an FFS partition after the ISO 9660 partition. Amigas with SCSI controllers will boot from the FFS partition. I'll have a CD filesystem in that partition, and mount the ISO 9660 partition from the startup-sequence. But in order to mount the ISO 9660 partition, I need to know the Exec device name and unit number of the boot drive. Obviously those will vary depending on the make of SCSI card and the CD drive SCSI ID. How can I determine the device and unit for the boot drive, in a way which works with both Kickstart 1.3 and 2.0+? |
16 February 2013, 19:43 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Quick and short answer:
Find boot dos device's DeviceNode in DosList (DosLibrary->dl_Root->rn_Info->di_DevInfo). DeviceNode->dn_Startup points to FileSysStartupMsg which has pointers to device name and unit number. (Note that all pointers are BPTR and strings are BSTR as usual) OS 2.0+ has functions for finding DeviceNodes. 1.3 requires manual enumeration. |
16 February 2013, 19:49 | #3 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,333
|
Thanks. Do I need to know the DOS device name (CDBOOT: or whatever I choose) or can I find the DeviceNode from "SYS:" somehow?
|
16 February 2013, 19:52 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
|
Yes, it is possible.
Find SYS: assign in DosList, save dol_Task. Find DLT_DEVICE DosList node which has same dol_Task. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Analogic's CD32 disk drive expander unit mini review. | Paul_s | Hardware pics | 100 | 27 August 2013 08:21 |
After creating OS 3.9 Emergency Disk: Cannot open "cd.device" unit 2 | Snowwie | support.Other | 2 | 31 March 2012 14:44 |
Where would I find a floppy power supply unit? | Narf the Mouse | support.Hardware | 3 | 22 January 2012 00:00 |
change the cd-rom unit number(sorry wrong place if a moderator can change) | turrican3 | support.OtherUAE | 19 | 04 May 2007 23:27 |
Can't get unit device # for CD-ROMs | MobbyG | support.WinUAE | 5 | 26 November 2003 09:52 |
|
|