Jump to content











Photo
- - - - -

How do i detect the boot device an ISO or image is booted off?


  • Please log in to reply
5 replies to this topic

#1 scrumpyjack

scrumpyjack

    Newbie

  • Members
  • 20 posts
  •  
    United Kingdom

Posted 17 November 2008 - 09:10 PM

If i boot a disk image such as DOS off a USB stick using Grub or other boot loader. How is possible to detect the original device it was booted off if in this case USB stick. If im in the mounted floppy image acting like a floppy, how can i detect the image is sat on a USB stick once the image is loaded up? :)

One idea i have is the BIOS stores in memory the device that was booted or using DOS util. Do you know of any easy way or anyway? Help.

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 17 November 2008 - 10:09 PM

Depends. If the host drive is accessable from within your booted OS. You can simply check each drive for the image.

:)

#3 scrumpyjack

scrumpyjack

    Newbie

  • Members
  • 20 posts
  •  
    United Kingdom

Posted 17 November 2008 - 10:15 PM

Depends. If the host drive is accessable from within your booted OS. You can simply check each drive for the image.

:)


yes but finding the image on a device thats accessible and its there doesnt tell me what type of device it on. if it CD possibly by read only device but what about for USB?

If i boot that same image off CD. How can i tell if i booted from CD or mounted it from USB?

I think one way is to look at the BIOS to see what booted but wanted to find an easier way.

If i booted off an emulated floppy is there a tool i can use to see what is the real device?

or does the boot loaders eg. Grub hide the original boot device so the BIOS thinks it booted off the emulated fake image so there isnt a way of knowing?

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 17 November 2008 - 11:45 PM

No idea, what it should be good for to know, what kind of device the image was loaded from.
But i would simply put a marker file on the host drive, that i can check for.

Without going more in detail, what you your end game is, there's not much useful help to be expected.


:)

#5 scrumpyjack

scrumpyjack

    Newbie

  • Members
  • 20 posts
  •  
    United Kingdom

Posted 18 November 2008 - 04:18 AM

thanks alot sharing has helped me think it through better. i found the BIOS memory location on my drive for the boot sequence but it is 0. it must be different for all BIOS. cant use a marker file on the outside of the CD as the CD is the entire image. i got a few ideas now to try. i was trying to work out too many ways to do it in my head, but doing it something will pop up.

#6 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 01 December 2008 - 08:07 PM

No idea, what it should be good for to know, what kind of device the image was loaded from.


The requested feature is a useful one. It makes maintenance more easy. You can boot your same bootmanager configuration files from different media (such as USB, CD, internal harddisk, floppy...).

With normal grub you need (cd0)/folder/filename style filenames, but what if it's (fd0) or (hd0)? With (bootdevice)/folder/file it would be a very nice generic solution. Hope you see the point now, otherwise ask again. :)

To answer the question... Such a feature afaik doesn't exists in most discussed (& used) bootmanagers arround here (plop, grub, grub4dos).

There is a feature calles setgrubdevice in supergrubdisk (a grub legacy fork). If some is skilled and interested he could rip off this features and send a patch to grub4dos.

If i booted off an emulated floppy is there a tool i can use to see what is the real device?

You can look if you like eltorito.sys.

Grub hide the original boot device so the BIOS thinks it booted off the emulated fake image so there isnt a way of knowing?

If grub(4dos) starts and you hand over control to some other loader then grub doesn't hide anything, however, you may use the hide function. The hide/swap/emulation function works only for BIOS calls to the device (DOS does this), with direct access to the device you will see it (emulated devices doesn't work in protected mode os's without special driver [no special driver exists yet]).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users