Protecting Dualbooting Windows from dangerous code (like rm -rf) 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)Howto mount drive as read-only with fstabHow to prepare HDD for Windows 8 install?dualboot windows 8 and ubuntu on seprate hddProtecting Live USB from Windows VirusesWill Partitioning My SSD For Dual Boot Cause A Performance Drop? Tips?What does “unmount” mean in terms of partitions?Dual boot with different disksMouse and keyboard issues when dualbooting Ubuntu and Windows 10Error mounting in Ubuntu and Unmountable boot volume in WindowsIs dual-boot Windows 10 with hibernation and Ubunutu 18.04 dangerous?Installed Windows 10 on a new SSD and now I can't access my old HDD with Linux on it

Who or what is the being for whom Being is a question for Heidegger?

How to split my screen on my Macbook Air?

Can the DM override racial traits?

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

High Q peak in frequency response means what in time domain?

Are my PIs rude or am I just being too sensitive?

How to delete random line from file using Unix command?

Wall plug outlet change

Is there a writing software that you can sort scenes like slides in PowerPoint?

What can I do if neighbor is blocking my solar panels intentionally?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Can a 1st-level character have an ability score above 18?

The variadic template constructor of my class cannot modify my class members, why is that so?

Sort a list of pairs representing an acyclic, partial automorphism

What is special about square numbers here?

Change bounding box of math glyphs in LuaTeX

Can undead you have reanimated wait inside a portable hole?

How should I replace vector<uint8_t>::const_iterator in an API?

How can I define good in a religion that claims no moral authority?

Wolves and sheep

Windows 10: How to Lock (not sleep) laptop on lid close?

How many people can fit inside Mordenkainen's Magnificent Mansion?

Does Parliament need to approve the new Brexit delay to 31 October 2019?

Arduino Pro Micro - switch off LEDs



Protecting Dualbooting Windows from dangerous code (like rm -rf)



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)Howto mount drive as read-only with fstabHow to prepare HDD for Windows 8 install?dualboot windows 8 and ubuntu on seprate hddProtecting Live USB from Windows VirusesWill Partitioning My SSD For Dual Boot Cause A Performance Drop? Tips?What does “unmount” mean in terms of partitions?Dual boot with different disksMouse and keyboard issues when dualbooting Ubuntu and Windows 10Error mounting in Ubuntu and Unmountable boot volume in WindowsIs dual-boot Windows 10 with hibernation and Ubunutu 18.04 dangerous?Installed Windows 10 on a new SSD and now I can't access my old HDD with Linux on it



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








16















I'm thinking of dualbooting Windows 10 and Ubuntu in different partitions of the same SSD. If codes like rm -rf somehow happens in the Ubuntu partition, does this affect Windows, or does it leave other partitions alone? And if it DOES affect the Windows partition, how can I prevent this from happening?










share|improve this question







New contributor




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















  • 3





    Take backups (which you should be doing anyway!)

    – pjc50
    Apr 10 at 10:01






  • 2





    Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

    – bremen_matt
    Apr 10 at 19:59


















16















I'm thinking of dualbooting Windows 10 and Ubuntu in different partitions of the same SSD. If codes like rm -rf somehow happens in the Ubuntu partition, does this affect Windows, or does it leave other partitions alone? And if it DOES affect the Windows partition, how can I prevent this from happening?










share|improve this question







New contributor




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















  • 3





    Take backups (which you should be doing anyway!)

    – pjc50
    Apr 10 at 10:01






  • 2





    Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

    – bremen_matt
    Apr 10 at 19:59














16












16








16








I'm thinking of dualbooting Windows 10 and Ubuntu in different partitions of the same SSD. If codes like rm -rf somehow happens in the Ubuntu partition, does this affect Windows, or does it leave other partitions alone? And if it DOES affect the Windows partition, how can I prevent this from happening?










share|improve this question







New contributor




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












I'm thinking of dualbooting Windows 10 and Ubuntu in different partitions of the same SSD. If codes like rm -rf somehow happens in the Ubuntu partition, does this affect Windows, or does it leave other partitions alone? And if it DOES affect the Windows partition, how can I prevent this from happening?







dual-boot partitioning 18.04 windows-10






share|improve this question







New contributor




K. Paul 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




K. Paul 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






New contributor




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









asked Apr 10 at 2:29









K. PaulK. Paul

837




837




New contributor




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





New contributor





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






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







  • 3





    Take backups (which you should be doing anyway!)

    – pjc50
    Apr 10 at 10:01






  • 2





    Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

    – bremen_matt
    Apr 10 at 19:59













  • 3





    Take backups (which you should be doing anyway!)

    – pjc50
    Apr 10 at 10:01






  • 2





    Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

    – bremen_matt
    Apr 10 at 19:59








3




3





Take backups (which you should be doing anyway!)

– pjc50
Apr 10 at 10:01





Take backups (which you should be doing anyway!)

– pjc50
Apr 10 at 10:01




2




2





Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

– bremen_matt
Apr 10 at 19:59






Everybody is worried about this, but I suggest you spin up a Docker container and try it out. Most Linux distros will make you answer yes and enter a password to do something truly dumb

– bremen_matt
Apr 10 at 19:59











4 Answers
4






active

oldest

votes


















14














If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them.



It's possible to make it harder to accidentally delete files, though.



If you want to read documents on your Windows 10 partition, you could mount the partition in read-only mode. You won't be able to edit Word documents, but it should be enough if you want to read PDF, listen to MP3's or watch movies on your Windows partition. Another possibility would be to create a FAT32 D: partition under Windows, which you would mount with write permissions under Ubuntu.



I could think of at least 5 short commands to destroy a Windows Partition from a Linux system, but they would all require root privileges. Be careful whenever you want to run a command starting with sudo or when a program tells you that "Authentication is required to run".



Finally, be very careful when installing Ubuntu along Windows. The installer makes it clear which partitions are resized, created or deleted but it's still possible to delete existing partitions if you ignore the warnings long enough.



To be safe, please follow @Emmet's excellent advice (be sure to backup your data).






share|improve this answer




















  • 2





    There is an equal amount of Windows commands that can damage an Ubuntu partition.

    – Brilsmurfffje
    Apr 10 at 10:59







  • 3





    @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

    – Eric Duminil
    Apr 10 at 11:30






  • 2





    Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

    – Monty Harder
    Apr 10 at 20:32






  • 1





    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

    – Mehrdad
    Apr 11 at 2:52











  • @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

    – Eric Duminil
    2 days ago


















11














The common basic to prevent data-loss: REMEMBER TO ALWAYS TAKE BACKUP OF YOUR FILES



It doesn't affect the windows partition, because you're running it from your Ubuntu machine.



Picture it like this



/dev/sda1 ntfs-bootfile
/dev/sda2 ntfs-win
/dev/sda5 ext4-root --> (YOUR LOCATION NOW)
/dev/sda6 ext4-swap


If you run rm -rf within your location, it would affect sda5 partition—in which your Ubuntu system reside. So it only affect Ubuntu.



Supposing you have grub boot loader to load the 2 OS (Ubuntu and Windows), if you accidentally remove GRUB file aswell, Windows would not be able to boot, but the data inside will remain intact.



However, Ubuntu tend to mount Windows partition when it available, and if you say ran rm -rf /*, Ubuntu—without hesitate will delete ALL file, this include Windows partition.



There's also infamous dd command, hence the disk destroyer nickname. This is widely used to: formatting drive, cloning disk, creating bootable usb etc.



dd has ability to dump entire main drive, dd if=/dev/zero of=/dev/sda would replacing all data on main drive with zero—and goodbye to our data !



With that being said, please be very careful when running command and always take a second look before doing execute something—it's best to prevent disaster before it happens.



I highly recommend you to learn various Linux command, this way you could tell what does the command do before you ran it.



Also, again please be elaborate when working with dd, it's common mistake to mistype sdb to sda, anything happens after that is horrible.






share|improve this answer




















  • 12





    The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

    – john01dav
    Apr 10 at 5:42







  • 2





    Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

    – Eric Duminil
    Apr 10 at 8:40






  • 4





    This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

    – marcelm
    Apr 10 at 8:41






  • 4





    @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

    – rexkogitans
    Apr 10 at 10:33






  • 2





    @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

    – Doug O'Neal
    Apr 10 at 16:47


















1














If the fact that you can't keep two operating systems on one disk from harming one another makes you look for other solutions, here more options. They depend on your practical needs and your budget.



You can run one (or both) systems as virtual machines instead of using separate partitions. The virtual machine should have limited access to the host or other virtual machine, so you cannot accidentally damage the host machine (though there will still be deliberate ways). Another advantage is that you can use both at the same time.



If you want your two operating systems completely separate, put them on swappable hard disks or even better, separate computers (less chance to accidentally destroy your disks).



If you need to be able to access the data but very often do the kind of stuff on your Linux which can harm the Windows system accidentally with a small lapse, put them on different machines and access Windows only through a remote access tool which respects the Windows security mechanisms. You'll get full access to your data and very high security at the price of a few hundred Euro/USD for extra hardware. Additionally, you have a backup system if one fails, so if you work on these machines, the extra cost can pay off.






share|improve this answer








New contributor




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



























    0














    Risks like this can be easily mitigated by enabling BitLocker drive encryption on the Windows10 operating system. Encrypting the partition makes it for Ubuntu unable to mount and thus perform actions like rm -r



    It also means that you are unable to share files with the ubuntu system via the windows partition.



    If you would like to share data between the two operating systems I would advise you to create a separate data partition which you mount on both operating systems.






    share|improve this answer


















    • 5





      Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

      – Patrick Trentin
      Apr 10 at 10:56







    • 2





      @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

      – Eric Duminil
      Apr 10 at 11:36












    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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
    );



    );






    K. Paul 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%2faskubuntu.com%2fquestions%2f1132599%2fprotecting-dualbooting-windows-from-dangerous-code-like-rm-rf%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    14














    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them.



    It's possible to make it harder to accidentally delete files, though.



    If you want to read documents on your Windows 10 partition, you could mount the partition in read-only mode. You won't be able to edit Word documents, but it should be enough if you want to read PDF, listen to MP3's or watch movies on your Windows partition. Another possibility would be to create a FAT32 D: partition under Windows, which you would mount with write permissions under Ubuntu.



    I could think of at least 5 short commands to destroy a Windows Partition from a Linux system, but they would all require root privileges. Be careful whenever you want to run a command starting with sudo or when a program tells you that "Authentication is required to run".



    Finally, be very careful when installing Ubuntu along Windows. The installer makes it clear which partitions are resized, created or deleted but it's still possible to delete existing partitions if you ignore the warnings long enough.



    To be safe, please follow @Emmet's excellent advice (be sure to backup your data).






    share|improve this answer




















    • 2





      There is an equal amount of Windows commands that can damage an Ubuntu partition.

      – Brilsmurfffje
      Apr 10 at 10:59







    • 3





      @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

      – Eric Duminil
      Apr 10 at 11:30






    • 2





      Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

      – Monty Harder
      Apr 10 at 20:32






    • 1





      If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

      – Mehrdad
      Apr 11 at 2:52











    • @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

      – Eric Duminil
      2 days ago















    14














    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them.



    It's possible to make it harder to accidentally delete files, though.



    If you want to read documents on your Windows 10 partition, you could mount the partition in read-only mode. You won't be able to edit Word documents, but it should be enough if you want to read PDF, listen to MP3's or watch movies on your Windows partition. Another possibility would be to create a FAT32 D: partition under Windows, which you would mount with write permissions under Ubuntu.



    I could think of at least 5 short commands to destroy a Windows Partition from a Linux system, but they would all require root privileges. Be careful whenever you want to run a command starting with sudo or when a program tells you that "Authentication is required to run".



    Finally, be very careful when installing Ubuntu along Windows. The installer makes it clear which partitions are resized, created or deleted but it's still possible to delete existing partitions if you ignore the warnings long enough.



    To be safe, please follow @Emmet's excellent advice (be sure to backup your data).






    share|improve this answer




















    • 2





      There is an equal amount of Windows commands that can damage an Ubuntu partition.

      – Brilsmurfffje
      Apr 10 at 10:59







    • 3





      @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

      – Eric Duminil
      Apr 10 at 11:30






    • 2





      Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

      – Monty Harder
      Apr 10 at 20:32






    • 1





      If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

      – Mehrdad
      Apr 11 at 2:52











    • @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

      – Eric Duminil
      2 days ago













    14












    14








    14







    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them.



    It's possible to make it harder to accidentally delete files, though.



    If you want to read documents on your Windows 10 partition, you could mount the partition in read-only mode. You won't be able to edit Word documents, but it should be enough if you want to read PDF, listen to MP3's or watch movies on your Windows partition. Another possibility would be to create a FAT32 D: partition under Windows, which you would mount with write permissions under Ubuntu.



    I could think of at least 5 short commands to destroy a Windows Partition from a Linux system, but they would all require root privileges. Be careful whenever you want to run a command starting with sudo or when a program tells you that "Authentication is required to run".



    Finally, be very careful when installing Ubuntu along Windows. The installer makes it clear which partitions are resized, created or deleted but it's still possible to delete existing partitions if you ignore the warnings long enough.



    To be safe, please follow @Emmet's excellent advice (be sure to backup your data).






    share|improve this answer















    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them.



    It's possible to make it harder to accidentally delete files, though.



    If you want to read documents on your Windows 10 partition, you could mount the partition in read-only mode. You won't be able to edit Word documents, but it should be enough if you want to read PDF, listen to MP3's or watch movies on your Windows partition. Another possibility would be to create a FAT32 D: partition under Windows, which you would mount with write permissions under Ubuntu.



    I could think of at least 5 short commands to destroy a Windows Partition from a Linux system, but they would all require root privileges. Be careful whenever you want to run a command starting with sudo or when a program tells you that "Authentication is required to run".



    Finally, be very careful when installing Ubuntu along Windows. The installer makes it clear which partitions are resized, created or deleted but it's still possible to delete existing partitions if you ignore the warnings long enough.



    To be safe, please follow @Emmet's excellent advice (be sure to backup your data).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 2 days ago

























    answered Apr 10 at 8:32









    Eric DuminilEric Duminil

    33317




    33317







    • 2





      There is an equal amount of Windows commands that can damage an Ubuntu partition.

      – Brilsmurfffje
      Apr 10 at 10:59







    • 3





      @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

      – Eric Duminil
      Apr 10 at 11:30






    • 2





      Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

      – Monty Harder
      Apr 10 at 20:32






    • 1





      If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

      – Mehrdad
      Apr 11 at 2:52











    • @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

      – Eric Duminil
      2 days ago












    • 2





      There is an equal amount of Windows commands that can damage an Ubuntu partition.

      – Brilsmurfffje
      Apr 10 at 10:59







    • 3





      @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

      – Eric Duminil
      Apr 10 at 11:30






    • 2





      Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

      – Monty Harder
      Apr 10 at 20:32






    • 1





      If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

      – Mehrdad
      Apr 11 at 2:52











    • @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

      – Eric Duminil
      2 days ago







    2




    2





    There is an equal amount of Windows commands that can damage an Ubuntu partition.

    – Brilsmurfffje
    Apr 10 at 10:59






    There is an equal amount of Windows commands that can damage an Ubuntu partition.

    – Brilsmurfffje
    Apr 10 at 10:59





    3




    3





    @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

    – Eric Duminil
    Apr 10 at 11:30





    @Brilsmurfffje: Sure, it's possible to damage an Ubuntu partition from Windows. Still, Ubuntu is usually installed after Windows, it's easier to mount NTFS in Ubuntu than Ext4 in Windows and command lines are more prevalent in Ubuntu than in Windows.

    – Eric Duminil
    Apr 10 at 11:30




    2




    2





    Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

    – Monty Harder
    Apr 10 at 20:32





    Whenever I've dual-booted Win/Lin, I would create a FAT32 partition that appears as D: in Windows, and use it to pass anything between the OSes. I simply do not trust Windows accessing ext3/4 or Linux accessing NTFS, with write privileges.

    – Monty Harder
    Apr 10 at 20:32




    1




    1





    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

    – Mehrdad
    Apr 11 at 2:52





    If you have physical access to a computer, you have the power to do anything with the files on it, including reading, corrupting or deleting them." I feel like you threw in "reading" a bit too quickly, considering encryption is a thing...

    – Mehrdad
    Apr 11 at 2:52













    @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

    – Eric Duminil
    2 days ago





    @Mehrdad: You're right. I couldn't find a way to mention encrypted files in this sentence, because you can corrupt or delete them even if you cannot decrypt the content.

    – Eric Duminil
    2 days ago













    11














    The common basic to prevent data-loss: REMEMBER TO ALWAYS TAKE BACKUP OF YOUR FILES



    It doesn't affect the windows partition, because you're running it from your Ubuntu machine.



    Picture it like this



    /dev/sda1 ntfs-bootfile
    /dev/sda2 ntfs-win
    /dev/sda5 ext4-root --> (YOUR LOCATION NOW)
    /dev/sda6 ext4-swap


    If you run rm -rf within your location, it would affect sda5 partition—in which your Ubuntu system reside. So it only affect Ubuntu.



    Supposing you have grub boot loader to load the 2 OS (Ubuntu and Windows), if you accidentally remove GRUB file aswell, Windows would not be able to boot, but the data inside will remain intact.



    However, Ubuntu tend to mount Windows partition when it available, and if you say ran rm -rf /*, Ubuntu—without hesitate will delete ALL file, this include Windows partition.



    There's also infamous dd command, hence the disk destroyer nickname. This is widely used to: formatting drive, cloning disk, creating bootable usb etc.



    dd has ability to dump entire main drive, dd if=/dev/zero of=/dev/sda would replacing all data on main drive with zero—and goodbye to our data !



    With that being said, please be very careful when running command and always take a second look before doing execute something—it's best to prevent disaster before it happens.



    I highly recommend you to learn various Linux command, this way you could tell what does the command do before you ran it.



    Also, again please be elaborate when working with dd, it's common mistake to mistype sdb to sda, anything happens after that is horrible.






    share|improve this answer




















    • 12





      The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

      – john01dav
      Apr 10 at 5:42







    • 2





      Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

      – Eric Duminil
      Apr 10 at 8:40






    • 4





      This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

      – marcelm
      Apr 10 at 8:41






    • 4





      @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

      – rexkogitans
      Apr 10 at 10:33






    • 2





      @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

      – Doug O'Neal
      Apr 10 at 16:47















    11














    The common basic to prevent data-loss: REMEMBER TO ALWAYS TAKE BACKUP OF YOUR FILES



    It doesn't affect the windows partition, because you're running it from your Ubuntu machine.



    Picture it like this



    /dev/sda1 ntfs-bootfile
    /dev/sda2 ntfs-win
    /dev/sda5 ext4-root --> (YOUR LOCATION NOW)
    /dev/sda6 ext4-swap


    If you run rm -rf within your location, it would affect sda5 partition—in which your Ubuntu system reside. So it only affect Ubuntu.



    Supposing you have grub boot loader to load the 2 OS (Ubuntu and Windows), if you accidentally remove GRUB file aswell, Windows would not be able to boot, but the data inside will remain intact.



    However, Ubuntu tend to mount Windows partition when it available, and if you say ran rm -rf /*, Ubuntu—without hesitate will delete ALL file, this include Windows partition.



    There's also infamous dd command, hence the disk destroyer nickname. This is widely used to: formatting drive, cloning disk, creating bootable usb etc.



    dd has ability to dump entire main drive, dd if=/dev/zero of=/dev/sda would replacing all data on main drive with zero—and goodbye to our data !



    With that being said, please be very careful when running command and always take a second look before doing execute something—it's best to prevent disaster before it happens.



    I highly recommend you to learn various Linux command, this way you could tell what does the command do before you ran it.



    Also, again please be elaborate when working with dd, it's common mistake to mistype sdb to sda, anything happens after that is horrible.






    share|improve this answer




















    • 12





      The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

      – john01dav
      Apr 10 at 5:42







    • 2





      Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

      – Eric Duminil
      Apr 10 at 8:40






    • 4





      This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

      – marcelm
      Apr 10 at 8:41






    • 4





      @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

      – rexkogitans
      Apr 10 at 10:33






    • 2





      @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

      – Doug O'Neal
      Apr 10 at 16:47













    11












    11








    11







    The common basic to prevent data-loss: REMEMBER TO ALWAYS TAKE BACKUP OF YOUR FILES



    It doesn't affect the windows partition, because you're running it from your Ubuntu machine.



    Picture it like this



    /dev/sda1 ntfs-bootfile
    /dev/sda2 ntfs-win
    /dev/sda5 ext4-root --> (YOUR LOCATION NOW)
    /dev/sda6 ext4-swap


    If you run rm -rf within your location, it would affect sda5 partition—in which your Ubuntu system reside. So it only affect Ubuntu.



    Supposing you have grub boot loader to load the 2 OS (Ubuntu and Windows), if you accidentally remove GRUB file aswell, Windows would not be able to boot, but the data inside will remain intact.



    However, Ubuntu tend to mount Windows partition when it available, and if you say ran rm -rf /*, Ubuntu—without hesitate will delete ALL file, this include Windows partition.



    There's also infamous dd command, hence the disk destroyer nickname. This is widely used to: formatting drive, cloning disk, creating bootable usb etc.



    dd has ability to dump entire main drive, dd if=/dev/zero of=/dev/sda would replacing all data on main drive with zero—and goodbye to our data !



    With that being said, please be very careful when running command and always take a second look before doing execute something—it's best to prevent disaster before it happens.



    I highly recommend you to learn various Linux command, this way you could tell what does the command do before you ran it.



    Also, again please be elaborate when working with dd, it's common mistake to mistype sdb to sda, anything happens after that is horrible.






    share|improve this answer















    The common basic to prevent data-loss: REMEMBER TO ALWAYS TAKE BACKUP OF YOUR FILES



    It doesn't affect the windows partition, because you're running it from your Ubuntu machine.



    Picture it like this



    /dev/sda1 ntfs-bootfile
    /dev/sda2 ntfs-win
    /dev/sda5 ext4-root --> (YOUR LOCATION NOW)
    /dev/sda6 ext4-swap


    If you run rm -rf within your location, it would affect sda5 partition—in which your Ubuntu system reside. So it only affect Ubuntu.



    Supposing you have grub boot loader to load the 2 OS (Ubuntu and Windows), if you accidentally remove GRUB file aswell, Windows would not be able to boot, but the data inside will remain intact.



    However, Ubuntu tend to mount Windows partition when it available, and if you say ran rm -rf /*, Ubuntu—without hesitate will delete ALL file, this include Windows partition.



    There's also infamous dd command, hence the disk destroyer nickname. This is widely used to: formatting drive, cloning disk, creating bootable usb etc.



    dd has ability to dump entire main drive, dd if=/dev/zero of=/dev/sda would replacing all data on main drive with zero—and goodbye to our data !



    With that being said, please be very careful when running command and always take a second look before doing execute something—it's best to prevent disaster before it happens.



    I highly recommend you to learn various Linux command, this way you could tell what does the command do before you ran it.



    Also, again please be elaborate when working with dd, it's common mistake to mistype sdb to sda, anything happens after that is horrible.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 10 at 14:45

























    answered Apr 10 at 2:49









    EmmetEmmet

    7,87822346




    7,87822346







    • 12





      The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

      – john01dav
      Apr 10 at 5:42







    • 2





      Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

      – Eric Duminil
      Apr 10 at 8:40






    • 4





      This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

      – marcelm
      Apr 10 at 8:41






    • 4





      @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

      – rexkogitans
      Apr 10 at 10:33






    • 2





      @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

      – Doug O'Neal
      Apr 10 at 16:47












    • 12





      The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

      – john01dav
      Apr 10 at 5:42







    • 2





      Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

      – Eric Duminil
      Apr 10 at 8:40






    • 4





      This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

      – marcelm
      Apr 10 at 8:41






    • 4





      @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

      – rexkogitans
      Apr 10 at 10:33






    • 2





      @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

      – Doug O'Neal
      Apr 10 at 16:47







    12




    12





    The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

    – john01dav
    Apr 10 at 5:42






    The OP asks about "codes like rm -rf." To me, this means the various destructive commands that can be done on a Linux system. Some of these will cause problems on Windows. For example cat /dev/zero > /dev/sda will write zeroes to all of /dev/sda, thus deleting all data on that drive and possibly the entire computer. Of course, such things are less likely in practice but they need to be acknowledged for a complete answer. If truly secure isolation is needed to prevent Linux from causing problems on Windows (or visa-versa), the only sufficient method is a virtual machine of some sort.

    – john01dav
    Apr 10 at 5:42





    2




    2





    Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

    – Eric Duminil
    Apr 10 at 8:40





    Also, the windows partition could be mounted in /media or /mnt. In that case, rm -rf would surely be able to destroy windows files.

    – Eric Duminil
    Apr 10 at 8:40




    4




    4





    This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

    – marcelm
    Apr 10 at 8:41





    This answer is incorrect if the Windows partition is mounted in Ubuntu! If, say, the Windows filesystem is mounted under /mnt, and you run rm -rf /*, it's bye bye Windows files...

    – marcelm
    Apr 10 at 8:41




    4




    4





    @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

    – rexkogitans
    Apr 10 at 10:33





    @wizzwizz4 "No, they'll be deleted afterwards". It depends on how the "*" expands, usually in alphabetic order, so "/bin" before "/mnt". But in fact, the order does not matter, because, as you already said, "rm" already resides in memory, and this is the only thing that matters.

    – rexkogitans
    Apr 10 at 10:33




    2




    2





    @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

    – Doug O'Neal
    Apr 10 at 16:47





    @EricDuminil Assuming that the system isn't swapping, as soon as rm opens all the libraries it needs, it will not matter if those libraries are deleted from the file system. They will stay on disk, unlinked but still open by rm. What will likely cause a problem is when the OS tries to fire up a new process that needs a file or device that has already been deleted. You might panic the system at that point.

    – Doug O'Neal
    Apr 10 at 16:47











    1














    If the fact that you can't keep two operating systems on one disk from harming one another makes you look for other solutions, here more options. They depend on your practical needs and your budget.



    You can run one (or both) systems as virtual machines instead of using separate partitions. The virtual machine should have limited access to the host or other virtual machine, so you cannot accidentally damage the host machine (though there will still be deliberate ways). Another advantage is that you can use both at the same time.



    If you want your two operating systems completely separate, put them on swappable hard disks or even better, separate computers (less chance to accidentally destroy your disks).



    If you need to be able to access the data but very often do the kind of stuff on your Linux which can harm the Windows system accidentally with a small lapse, put them on different machines and access Windows only through a remote access tool which respects the Windows security mechanisms. You'll get full access to your data and very high security at the price of a few hundred Euro/USD for extra hardware. Additionally, you have a backup system if one fails, so if you work on these machines, the extra cost can pay off.






    share|improve this answer








    New contributor




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
























      1














      If the fact that you can't keep two operating systems on one disk from harming one another makes you look for other solutions, here more options. They depend on your practical needs and your budget.



      You can run one (or both) systems as virtual machines instead of using separate partitions. The virtual machine should have limited access to the host or other virtual machine, so you cannot accidentally damage the host machine (though there will still be deliberate ways). Another advantage is that you can use both at the same time.



      If you want your two operating systems completely separate, put them on swappable hard disks or even better, separate computers (less chance to accidentally destroy your disks).



      If you need to be able to access the data but very often do the kind of stuff on your Linux which can harm the Windows system accidentally with a small lapse, put them on different machines and access Windows only through a remote access tool which respects the Windows security mechanisms. You'll get full access to your data and very high security at the price of a few hundred Euro/USD for extra hardware. Additionally, you have a backup system if one fails, so if you work on these machines, the extra cost can pay off.






      share|improve this answer








      New contributor




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






















        1












        1








        1







        If the fact that you can't keep two operating systems on one disk from harming one another makes you look for other solutions, here more options. They depend on your practical needs and your budget.



        You can run one (or both) systems as virtual machines instead of using separate partitions. The virtual machine should have limited access to the host or other virtual machine, so you cannot accidentally damage the host machine (though there will still be deliberate ways). Another advantage is that you can use both at the same time.



        If you want your two operating systems completely separate, put them on swappable hard disks or even better, separate computers (less chance to accidentally destroy your disks).



        If you need to be able to access the data but very often do the kind of stuff on your Linux which can harm the Windows system accidentally with a small lapse, put them on different machines and access Windows only through a remote access tool which respects the Windows security mechanisms. You'll get full access to your data and very high security at the price of a few hundred Euro/USD for extra hardware. Additionally, you have a backup system if one fails, so if you work on these machines, the extra cost can pay off.






        share|improve this answer








        New contributor




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










        If the fact that you can't keep two operating systems on one disk from harming one another makes you look for other solutions, here more options. They depend on your practical needs and your budget.



        You can run one (or both) systems as virtual machines instead of using separate partitions. The virtual machine should have limited access to the host or other virtual machine, so you cannot accidentally damage the host machine (though there will still be deliberate ways). Another advantage is that you can use both at the same time.



        If you want your two operating systems completely separate, put them on swappable hard disks or even better, separate computers (less chance to accidentally destroy your disks).



        If you need to be able to access the data but very often do the kind of stuff on your Linux which can harm the Windows system accidentally with a small lapse, put them on different machines and access Windows only through a remote access tool which respects the Windows security mechanisms. You'll get full access to your data and very high security at the price of a few hundred Euro/USD for extra hardware. Additionally, you have a backup system if one fails, so if you work on these machines, the extra cost can pay off.







        share|improve this answer








        New contributor




        Carl Dombrowski 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




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









        answered Apr 10 at 23:51









        Carl DombrowskiCarl Dombrowski

        111




        111




        New contributor




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





        New contributor





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






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





















            0














            Risks like this can be easily mitigated by enabling BitLocker drive encryption on the Windows10 operating system. Encrypting the partition makes it for Ubuntu unable to mount and thus perform actions like rm -r



            It also means that you are unable to share files with the ubuntu system via the windows partition.



            If you would like to share data between the two operating systems I would advise you to create a separate data partition which you mount on both operating systems.






            share|improve this answer


















            • 5





              Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

              – Patrick Trentin
              Apr 10 at 10:56







            • 2





              @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

              – Eric Duminil
              Apr 10 at 11:36
















            0














            Risks like this can be easily mitigated by enabling BitLocker drive encryption on the Windows10 operating system. Encrypting the partition makes it for Ubuntu unable to mount and thus perform actions like rm -r



            It also means that you are unable to share files with the ubuntu system via the windows partition.



            If you would like to share data between the two operating systems I would advise you to create a separate data partition which you mount on both operating systems.






            share|improve this answer


















            • 5





              Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

              – Patrick Trentin
              Apr 10 at 10:56







            • 2





              @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

              – Eric Duminil
              Apr 10 at 11:36














            0












            0








            0







            Risks like this can be easily mitigated by enabling BitLocker drive encryption on the Windows10 operating system. Encrypting the partition makes it for Ubuntu unable to mount and thus perform actions like rm -r



            It also means that you are unable to share files with the ubuntu system via the windows partition.



            If you would like to share data between the two operating systems I would advise you to create a separate data partition which you mount on both operating systems.






            share|improve this answer













            Risks like this can be easily mitigated by enabling BitLocker drive encryption on the Windows10 operating system. Encrypting the partition makes it for Ubuntu unable to mount and thus perform actions like rm -r



            It also means that you are unable to share files with the ubuntu system via the windows partition.



            If you would like to share data between the two operating systems I would advise you to create a separate data partition which you mount on both operating systems.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 10 at 10:41









            BrilsmurfffjeBrilsmurfffje

            1033




            1033







            • 5





              Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

              – Patrick Trentin
              Apr 10 at 10:56







            • 2





              @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

              – Eric Duminil
              Apr 10 at 11:36













            • 5





              Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

              – Patrick Trentin
              Apr 10 at 10:56







            • 2





              @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

              – Eric Duminil
              Apr 10 at 11:36








            5




            5





            Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

            – Patrick Trentin
            Apr 10 at 10:56






            Being unable to mount a file system does not make Ubuntu unable to damage it. dd could still overwrite relevant sectors of the disk used by windows, making the encrypted file system permanently unrecoverable.

            – Patrick Trentin
            Apr 10 at 10:56





            2




            2





            @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

            – Eric Duminil
            Apr 10 at 11:36






            @PatrickTrentin: Indeed. You may not be able to read any meaningful content from Windows partition, but cat, dd, fdisk, parted, or mkfs.ntfs will all happily destroy any data on the partition, encrypted or not.

            – Eric Duminil
            Apr 10 at 11:36











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









            draft saved

            draft discarded


















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












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











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














            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1132599%2fprotecting-dualbooting-windows-from-dangerous-code-like-rm-rf%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

            NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided