Root shell in system filesystem with GRUB2019 Community Moderator ElectionHow does Linux deal with a separate /boot partition?installing grub and a working kernel over an old and broken debian systemGrub error: unknown filesystem. (all partitions are unknown)Read the UUID of a known partition into a variable in GRUBArch Linux: GRUB does not load after installationHow to format drive without losing grub?Grub won't boot from GPT RAID (gave up waiting for root device)Ubuntu Server 16.04.3LTS Squashfs as root from Grubgrub rescue ls – no partitions shown?Installing GRUB on an nvme drive

Did the UK lift the requirement for registering SIM cards?

The IT department bottlenecks progress, how should I handle this?

How do I fix the group tension caused by my character stealing and possibly killing without provocation?

Circuit Analysis: Obtaining Close Loop OP - AMP Transfer function

Is there a RAID 0 Equivalent for RAM?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

C++ check if statement can be evaluated constexpr

15% tax on $7.5k earnings. Is that right?

Delete multiple columns using awk or sed

"It doesn't matter" or "it won't matter"?

How to preserve electronics (computers, iPads and phones) for hundreds of years

Is my low blitz game drawing rate at www.chess.com an indicator that I am weak in chess?

Will number of steps recorded on FitBit/any fitness tracker add up distance in PokemonGo?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Is it necessary to use pronouns with the verb "essere"?

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

What is the highest possible scrabble score for placing a single tile

awk assign to multiple variables at once

How could a planet have erratic days?

Find the next value of this number series

Can I say "fingers" when referring to toes?

Non-trope happy ending?

Mimic lecturing on blackboard, facing audience

Why can't the Brexit deadlock in the UK parliament be solved with a plurality vote?



Root shell in system filesystem with GRUB



2019 Community Moderator ElectionHow does Linux deal with a separate /boot partition?installing grub and a working kernel over an old and broken debian systemGrub error: unknown filesystem. (all partitions are unknown)Read the UUID of a known partition into a variable in GRUBArch Linux: GRUB does not load after installationHow to format drive without losing grub?Grub won't boot from GPT RAID (gave up waiting for root device)Ubuntu Server 16.04.3LTS Squashfs as root from Grubgrub rescue ls – no partitions shown?Installing GRUB on an nvme drive










2















I'm learning about GRUB and, after search for a while, I tried to get a root shell changing the kernel load string:



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... ro single


to



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... rw single init=/bin/bash


It works and I get a root console. However, The filesystem mounted on "/" directory of this filesystem is not the filesystem mounted on the "original" system. I checked if it is a chroot but it isn't.



Could someone explain what is the filesystem mounted on / in this root shell?



How can I access to the original fs? I'm on Debian 7.



Thank you very much. Any help or any explanation would be nice.



EDIT



I notice that I get root access to a system filesystem (the fs mounted on the / partition). However, I would like to get into other partitions such as /home.



Explained:



I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do










share|improve this question









New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Whats your working directory when you get shell access? What is the results when you run ls?

    – kemotep
    yesterday











  • @kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

    – Miguel_sec
    yesterday






  • 2





    @GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

    – Miguel_sec
    yesterday















2















I'm learning about GRUB and, after search for a while, I tried to get a root shell changing the kernel load string:



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... ro single


to



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... rw single init=/bin/bash


It works and I get a root console. However, The filesystem mounted on "/" directory of this filesystem is not the filesystem mounted on the "original" system. I checked if it is a chroot but it isn't.



Could someone explain what is the filesystem mounted on / in this root shell?



How can I access to the original fs? I'm on Debian 7.



Thank you very much. Any help or any explanation would be nice.



EDIT



I notice that I get root access to a system filesystem (the fs mounted on the / partition). However, I would like to get into other partitions such as /home.



Explained:



I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do










share|improve this question









New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Whats your working directory when you get shell access? What is the results when you run ls?

    – kemotep
    yesterday











  • @kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

    – Miguel_sec
    yesterday






  • 2





    @GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

    – Miguel_sec
    yesterday













2












2








2








I'm learning about GRUB and, after search for a while, I tried to get a root shell changing the kernel load string:



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... ro single


to



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... rw single init=/bin/bash


It works and I get a root console. However, The filesystem mounted on "/" directory of this filesystem is not the filesystem mounted on the "original" system. I checked if it is a chroot but it isn't.



Could someone explain what is the filesystem mounted on / in this root shell?



How can I access to the original fs? I'm on Debian 7.



Thank you very much. Any help or any explanation would be nice.



EDIT



I notice that I get root access to a system filesystem (the fs mounted on the / partition). However, I would like to get into other partitions such as /home.



Explained:



I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do










share|improve this question









New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I'm learning about GRUB and, after search for a while, I tried to get a root shell changing the kernel load string:



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... ro single


to



/boot/vmlinuz-4.9.0-8amd64 root=UUID=e8485edc.... rw single init=/bin/bash


It works and I get a root console. However, The filesystem mounted on "/" directory of this filesystem is not the filesystem mounted on the "original" system. I checked if it is a chroot but it isn't.



Could someone explain what is the filesystem mounted on / in this root shell?



How can I access to the original fs? I'm on Debian 7.



Thank you very much. Any help or any explanation would be nice.



EDIT



I notice that I get root access to a system filesystem (the fs mounted on the / partition). However, I would like to get into other partitions such as /home.



Explained:



I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do







debian shell linux-kernel grub2 grub






share|improve this question









New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 11 hours ago









GAD3R

27.3k1858113




27.3k1858113






New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Miguel_secMiguel_sec

133




133




New contributor




Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Miguel_sec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Whats your working directory when you get shell access? What is the results when you run ls?

    – kemotep
    yesterday











  • @kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

    – Miguel_sec
    yesterday






  • 2





    @GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

    – Miguel_sec
    yesterday

















  • Whats your working directory when you get shell access? What is the results when you run ls?

    – kemotep
    yesterday











  • @kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

    – Miguel_sec
    yesterday






  • 2





    @GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

    – Miguel_sec
    yesterday
















Whats your working directory when you get shell access? What is the results when you run ls?

– kemotep
yesterday





Whats your working directory when you get shell access? What is the results when you run ls?

– kemotep
yesterday













@kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

– Miguel_sec
yesterday





@kemotep is the root directory and if I run ls I get all linux directories (/home, /var..)

– Miguel_sec
yesterday




2




2





@GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

– Miguel_sec
yesterday





@GAD3R I think I don't have explained myself correctly. I have, for example, 5 partitions (/, /home, /var, /usr, swap). When I do the trick and I get a root shell, I get into / partition, so i'm not able to see what is in home partition. However, fdisk -l command shows all partitions but df -h only shows two fs of two of these partitions (/ and /usr). I would like to see what is in /home partition. What can I do?

– Miguel_sec
yesterday










1 Answer
1






active

oldest

votes


















2














You can simply run



mount -a


to mount all the filesystems that your system would usually mount (ie. all the entries in /etc/fstab)






share|improve this answer








New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

    – Miguel_sec
    yesterday












  • @Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

    – Entropy0
    yesterday











  • Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

    – Miguel_sec
    yesterday










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Miguel_sec is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507536%2froot-shell-in-system-filesystem-with-grub%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You can simply run



mount -a


to mount all the filesystems that your system would usually mount (ie. all the entries in /etc/fstab)






share|improve this answer








New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

    – Miguel_sec
    yesterday












  • @Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

    – Entropy0
    yesterday











  • Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

    – Miguel_sec
    yesterday















2














You can simply run



mount -a


to mount all the filesystems that your system would usually mount (ie. all the entries in /etc/fstab)






share|improve this answer








New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

    – Miguel_sec
    yesterday












  • @Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

    – Entropy0
    yesterday











  • Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

    – Miguel_sec
    yesterday













2












2








2







You can simply run



mount -a


to mount all the filesystems that your system would usually mount (ie. all the entries in /etc/fstab)






share|improve this answer








New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










You can simply run



mount -a


to mount all the filesystems that your system would usually mount (ie. all the entries in /etc/fstab)







share|improve this answer








New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered yesterday









Entropy0Entropy0

562




562




New contributor




Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Entropy0 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

    – Miguel_sec
    yesterday












  • @Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

    – Entropy0
    yesterday











  • Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

    – Miguel_sec
    yesterday

















  • Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

    – Miguel_sec
    yesterday












  • @Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

    – Entropy0
    yesterday











  • Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

    – Miguel_sec
    yesterday
















Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

– Miguel_sec
yesterday






Can you believe that I was reloading webpage to say that I found the solution? Yep, that was the issue. I don't knwo why fs weren't mounted but that's it. Thanks!

– Miguel_sec
yesterday














@Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

– Entropy0
yesterday





@Miguel_sec Wekk, they weren't loaded since that is usually done by your OS's init processes (be they init.d, systemd or something else entirely), which you overwrote with init=/bin/bash.

– Entropy0
yesterday













Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

– Miguel_sec
yesterday





Oh wait, thanks! I thought I understand it at 100% but I didn't. That is interesting :) Ty

– Miguel_sec
yesterday










Miguel_sec is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Miguel_sec is a new contributor. Be nice, and check out our Code of Conduct.












Miguel_sec is a new contributor. Be nice, and check out our Code of Conduct.











Miguel_sec is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507536%2froot-shell-in-system-filesystem-with-grub%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.