Page 1 of 1

Is there a way to determine what the boot drive was?

Posted: 13 Jan 2015, 16:42
by rgroner
Once booted into Porteus, is there a way to tell which /dev/sd* was the one that was booted from? Normally I'd think mount would give up that info, but it doesn't show which device / is mounted to.

Ultimately, I'm trying to always mount the 2nd partition of a drive to a certain mount point, regardless of how many other partitions or devices are in the system. I can't rely on /dev/sda2 to always be the 2nd partition of my particular drive. I know I could use the UUID but I'd rather not....I want it to be more flexible than that. If I can figure out which /dev/sd?1 is the boot drive, then I'll know /dev/sd?2 is the 2nd partition I'm looking for.

Re: Is there a way to determine what the boot drive was?

Posted: 13 Jan 2015, 17:34
by brokenman
grep -A1 data /var/log/porteus-livedbg

grep -A1 data /var/log/porteus-livedbg | tail -n1 | awk -F/ '{print$3}'

Re: Is there a way to determine what the boot drive was?

Posted: 13 Jan 2015, 18:24
by rgroner
Great, thanks! Works perfect!