0

My question is as follows: Is there a way for a linux installation disk (ubuntu 18.xx LTS on bootable stick) to know what operating systems computer has on a disk ?

I've found similiar topics here: How do I tell what version and edition of Windows is on the filesystem?

Which give adequate answer regarding Windows side. But what if USB is booted from Macbook or some other LaptopPC that has Linux?

Is there some sort of script or open-source application that (if executed) could detect all operating systems located on system ?

LempsPC
  • 41
  • 6
  • If it was a Mac, you probably couldn't even read the disk, HFS or APFS. If it was T2/boot mode/filevault protected, you wouldn't get permission even if you could read it. – Tetsujin Feb 18 '20 at 14:39
  • " could detect all operating systems located on system ?" Not that I have ever seen, maybe someone could write one though, – Moab Feb 18 '20 at 15:09

1 Answers1

-1

All Unixy systems should have a file /etc/*-release (perhaps several!) or similar, containing the name and version of the operating system. Sure, a mischievous sysadmin can very well fake that, but it should be rather reliable. That presupposes that you can mount and read the relevant filessytem.

vonbrand
  • 2,451
  • 3
  • 21
  • 21
  • 2
    For Linux, the standard location is `/etc/os-release` or `/usr/lib/os-release`. But for non-Linux systems (BSDs, Solaris) I'm not sure if such a convention ever existed -- nor whether it needs to, as the kernel info from `uname` usually provides the information already... – u1686_grawity Feb 18 '20 at 15:34
  • @user1686, I remember such a file on Solaris and Ultrix, and perhaps on an IBM RT running AIX (sorry, machines long buried and forgotten, memory perhaps shot...). – vonbrand Feb 19 '20 at 13:29