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

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
rgroner
Black ninja
Black ninja
Posts: 58
Joined: 23 Oct 2014, 14:23
Distribution: Porteus 3.0.1
Location: U.S.

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

Post#1 by rgroner » 13 Jan 2015, 16:42

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.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5652
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#2 by brokenman » 13 Jan 2015, 17:34

grep -A1 data /var/log/porteus-livedbg

grep -A1 data /var/log/porteus-livedbg | tail -n1 | awk -F/ '{print$3}'
How do i become super user?
Wear your underpants on the outside and put on a cape.

rgroner
Black ninja
Black ninja
Posts: 58
Joined: 23 Oct 2014, 14:23
Distribution: Porteus 3.0.1
Location: U.S.

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

Post#3 by rgroner » 13 Jan 2015, 18:24

Great, thanks! Works perfect!

Post Reply