Jump to content

Will all partitions be affected when I do something wrong on Linux?

Hey guys,

I'd like to learn more about C programing and download Linux on a partition of my HDD.

My running system right now is Windows 10, but this is installed on a SSD and the HDD is for work.

So I'd like to create a partition on this HDD and install Linux there.

My question now is, if I do something wrong on Linux and delete all my data there or d something worse (because I'm a beginner :-D), is the partition with Windows 10 also affected or is my data safe there?

 

Secondly, which Linux system do you recommend me? Ubuntu, arch? Or what else is good for C programing for beginners?


Thank you in advance!!

Link to comment
Share on other sites

Link to post
Share on other sites

Your windows 10 is fine unless your do something like delete the partition for windows 10, you can't do this easily.

 

Id suggest just using a vm first.

 

Ubuntu is good for begginers, id stay away from arch if you don't have much experience

 

Link to comment
Share on other sites

Link to post
Share on other sites

How much of "a beginner" are you? (Genuinely not intended as an insult)

 

Do you understand how drive partitioning works? Do you know the difference between volumes and partitions? Can you establish which drive is which without Windows drive lettering?

 

Linux (at least if you use GUI Install Mode) has a fairly easy to understand drive partitioning routine and you could easily do everything you need from it but it has some fundamental differences from Windows. Drives are assigned IDs (usually SDA0, SDA1, SDA2 etc) instead of Letters so it's important you learn exactly which drives are which before you make any changes.

 

Also understand that when manually partitioning an existing volume Linux will expect you do manually assign either an MBR boot volume or an EFI boot partition (depending of whether you're legacy mode booting or EFI mode booting) as well as swap space (not 100% necessary but definitely recommended) otherwise you'll get through the install and it just won't boot.

 

Linux has some pretty advanced partitioning features that Windows does not, you can span your filesystem across multiple partitions and encrypt partitions but I'd recommend you ignore these until you're more familiar but you do need to assign the root mount point (it will be the forward slash option [/]) to your main data partition (the largest partition where your data will be stored), this is VERY important.

 

Lastly if you're worried about your Windows partition then you can always unplug it before you do anything, that way your data is 100% safe but then GRUB won't detect Windows and add it to the boot menu.

 

It's also possible to shrink the partition you want to install to in Windows so it's raw then use Linux to create it's partitions on the raw space.

 

If any of this sounds to much I'd STRONGLY recommend you get VMWare or Virtual Box and play around in that first.

 

Good luck.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Master Disaster said:

How much of "a beginner" are you? (Genuinely not intended as an insult)

 

Do you understand how drive partitioning works? Do you know the difference between volumes and partitions? Can you establish which drive is which without Windows drive lettering?

 

Linux (at least if you use GUI Install Mode) has a fairly easy to understand drive partitioning routine and you could easily do everything you need from it but it has some fundamental differences from Windows. Drives are assigned IDs (usually SDA0, SDA1, SDA2 etc) instead of Letters so it's important you learn exactly which drives are which before you make any changes.

 

Also understand that when manually partitioning an existing volume Linux will expect you do manually assign either an MBR boot volume or an EFI boot partition (depending of whether you're legacy mode booting or EFI mode booting) as well as swap space (not 100% necessary but definitely recommended) otherwise you'll get through the install and it just won't boot.

 

Lastly if you're worried about your Windows partition then you can always unplug it before you do anything, that way your data is 100% safe but then GRUB won't detect Windows and add it to the boot menu.

 

It's also possible to shrink the partition you want to install to in Windows so it's raw then use Linux to create it's partitions on the raw space.

 

If any of this sounds to much I'd STRONGLY recommend you get VMWare or Virtual Box and play around in that first.

 

Good luck.

That seems to be pretty complicated.

But using a VM means that I will have to install ubuntu every time I want to use it?

I think using a total different drive would be the safest way or not? I can't delete anything from the other drives or can I?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Hip said:

That seems to be pretty complicated.

But using a VM means that I will have to install ubuntu every time I want to use it?

I think using a total different drive would be the safest way or not? I can't delete anything from the other drives or can I?

When you make a vm why you have to install Ubuntu every time you can SAFE fills you know.

you are gonna make a dual boot I gues, when the HDD disk is clean nothing can happen on your SSD with Windows only when you instal Ubuntu on the wrong disk you will delete your safed memory on it.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Hip said:

That seems to be pretty complicated.

But using a VM means that I will have to install ubuntu every time I want to use it?

I think using a total different drive would be the safest way or not? I can't delete anything from the other drives or can I?

No, you can create a Virtual Machine, Install Linux and it will stay installed. You can boot it from inside Windows any time you want.

 

A separate drive would be the ideal solution, that way you just tell Linux to use the clean drive and auto partition, it will do everything for you and should just work.

 

You can possibly erase the other drives if you get something wrong but as I said, if you unplug the power to the drives you don't want erasing and leave only the Linux drive plugged in then you literally cannot mess anything else up. Linux will detect one drive and simply ask if you want to use that drive to install onto, you wouldn't have to do anything advanced, just click OK and wait.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, Master Disaster said:

No, you can create a Virtual Machine, Install Linux and it will stay installed. You can boot it from inside Windows any time you want.

 

A separate drive would be the ideal solution, that way you just tell Linux to use the clean drive and auto partition, it will do everything for you and should just work.

 

You can possibly erase the other drives if you get something wrong but as I said, if you unplug the power to the drives you don't want erasing and leave only the Linux drive plugged in then you literally cannot mess anything else up. Linux will detect one drive and simply ask if you want to use that drive to install onto, you wouldn't have to do anything advanced, just click OK and wait.

May I ask you what the difference between Volumes and Partitions is because you mentioned it lately.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Hip said:

May I ask you what the difference between Volumes and Partitions is because you mentioned it lately.

Instead of me typing out a silly long explanation...

 

https://www.differencebetween.com/difference-between-partition-and-vs-volume/

 

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, Hip said:

Hey guys,

I'd like to learn more about C programing and download Linux on a partition of my HDD.

My running system right now is Windows 10, but this is installed on a SSD and the HDD is for work.

So I'd like to create a partition on this HDD and install Linux there.

My question now is, if I do something wrong on Linux and delete all my data there or d something worse (because I'm a beginner :-D), is the partition with Windows 10 also affected or is my data safe there?

 

Secondly, which Linux system do you recommend me? Ubuntu, arch? Or what else is good for C programing for beginners?


Thank you in advance!!

Hello,

I'm an Ubuntu user (currently run 17.10, but will switch to 18.04 once it's released). I'm glad that GNU/Linux is interesting for you, however it might not be a good choice for you. First, I'll present an argument that you don't need it; then I'll tell you how to try GNU/Linux without committing to it; and lastly, I'll explain why dual-booting is probably the worst possible option.

 

If your main objective is to learn about programming in C, then you don't need Linux. In fact, I'd recommend to stick with Windows 10 simply because you are already familiar with it and learning your way around the Linux distribution (and console, e.g. bash) would make learning curve a bit steeper. Programming language (including C) is just a set of pragmas (fundamental "philosophical" principals of what is correct) and syntax ("grammar") -- it is the same for any OS. Actually, there are in fact different revisions of C, like C99 or C11, but they are not tied to OS'es, and instead to compilers (and flags) you use. Thus, if you want to learn just C, learn C in an environment you are familiar with. Unless you are planning to use some advanced functionality of Linux (like write kernel modules), Windows should suffice (e.g., file I/O and threading are not identical, but similar enough for learning purposes).

 

If you just want to explore the bare basics, try https://www.hackerrank.com/ or something similar -- there you are presented with small challenges that you can solve right in your browser. (You code in a text box and immediately get graded; your solution is graded on their servers, so to start you just need to register and pick a challenge. Challenges are primitive, like traverse doubly-linked list or do something with a tree, but you might like it.

 

If you are interested in GNU/Linux, then Windows 10 has "Windows Subsystem for Linux" -- basically it is a Microsoft-provided compatibility layer (like VM) that would let you run terminal applications without living comfort of Windows 10. Another temporary solution is to use a Live USB -- to install GNU/Linux on USB drive and to boot from it! Then you simply change drive boot priority, but do not risk damaging your existing Windows 10 installation. Of course, you can always use a VM as well.

 

Lastly, here is why you should avoid dual booting from the same physical drive: you can break your file system and loose your data! That should scare you, unless you do regular backups. Also, (you should know already) do a full backup of important files before performing any major operations on the OS.

When you dual boot, in reality you boot into a "menu" (usually provided by GNU/Linux) where you choose which OS and with which options to boot; that means that when you install dual boot, your original MBR/EFI should be moved, resulting in permanent changes to your system. No Ctrl+Z for this! On the other hand, if you boot from different physical drives, you would simply need to change the boot order; then in GNU/Linux you can mount the Windows 10 drive easily. If something goes wrong (you break GNU/Linux), you can just go back to Windows.

 

The world runs on GNU/Linux, but does not spin only around it. (Sorry, that's cheesy... I'm almost done). In fact, you probably play video games, guess what: gaming is the weakest spot of Linux. Even Valve could not resolve it with their SteamOS, and that's not for lack of trying. (Linux is not bad for gaming, game developers simply don't care about its minuscule market share.) Unless you are OK with using Wine and managing its different installed versions (and loose some performance), I'd recommend against it.

 

GNU/Linux is more than an OS -- it is a lifestyle. You can do much more, but you can break much more too.
For example, today I finally installed a Windows game from mid-2000, which would not work on North-American Windows because of Windows-1251 encoded file paths... so I scanned the binary and tried to replace the paths in the .data segment. Does it work? Yes... Stable? I don't know... Is it worth it? Definitely not, a VM could play it. But this is definitely more fun then the game itself.

Link to comment
Share on other sites

Link to post
Share on other sites

No. It's a translation layer for the windows kernel. It's a feature of Windows 10. It allows you to run Linux binaries on Windows. More specifically it allows the Windows kernel to talk to Linux programs as if it were a Linux kernel.   

 

https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, geo3 said:

No. It's a translation layer for the windows kernel. It's a feature of Windows 10. It allows you to run Linux binaries on Windows. More specifically it allows the Windows kernel to talk to Linux programs as if it were a Linux kernel.   

 

https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

But can I program in C on this?

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, geo3 said:

Yes.

 

I'll have to do some research about it thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Hip said:

I'll have to do some research about it thanks.

You can just use a live usb to boot up Linux. No need to install.

 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×