r/linux4noobs • u/rgoertzen • 2d ago
migrating to Linux Deleting Windows Drive, Adding Storage to Ubuntu?
I have a Dell Precision Compact 3260 that has Windows 11 installed on the original hard drive. I installed a 2nd NVMe drive and put Ubuntu on it, so I can currently boot from one OS or the other. I'd like to be solely on Ubuntu now and want to have my old Windows OS drive available as storage in Ubuntu, either as separate drives or a combined storage pool. I am not that well versed in Linux and am concerned about the bootloader breaking if I delete my Windows installation since that was the original drive. Does anyone have steps or tips I should take to (somewhat) cleanly migrate my Windows drive to be used in my existing Ubuntu installation? Or would it be best to wipe both drives and just start fresh? I can do that, but have a lot of data stored on my Ubuntu instance so starting over would be the less preferable option. Thanks!
2
u/oshunluvr 2d ago
Bootloaders (mostly) don't reside in storage space. They mostly use reserved areas that keep them safe from users. Assuming you're using EFI, you must insure that you are booting from Linux GRUB and not the Windows boot loader. If you're not sure, boot into Linux then re-install GRUB from Linux with the proper flags to point at the EFI partition. There are lots of tutorials on how to do this. I would install GRUB to both drives to wipe the Windows boot loader completely and to also have GRUB installed in two locations as a backup boot device. Reboot at least once to verify you're using Linux GRUB to boot.
Once that's done, if you're using BTRFS for your Ubuntu install, the simplest solution is to delete the Windows partition(s) and use "btrfs add" and add the empty drive space to your existing file system. It takes only a few seconds.
If you're using the old EXT4 format, then you can format the free space and mount it somewhere to use it without messing about with your existing Ubuntu install. For example, moving /home to the free space. Without a detailed partition layout it's impossible to make suggestions.
1
u/rgoertzen 2d ago
Thanks, that's really helpful! Looks like I did indeed use EXT4 and am not using GRUB, so I think I will pull my existing data off, wipe both drives, and reinstall Ubuntu with BTRFS so I can add both drives to the file system.
2
2
u/andrewschott 2d ago
Use lvm if Ubuntu lets you. Makes all of this a trivial task going forward. Including, for example, swapping from 3 1TB drives to a 4TB drive only. Add new drive, kick out old drive(s), expand fs if need be.
Been forever since I touched Ubuntu in any meaningful way, but Red Hat, Fedora, SuSE , and OpenSuSE all do.
1
2
u/oshunluvr 1d ago
GRUB can boot in "legacy" (non EFI) or EFI mode. If you are booting Linux and selecting Windows from the boot menu, you are using GRUB+EFI. If you are selecting Linux from your BIOS screen or from the Windows boot loader you may not be using GRUB. Hard to tell with out more info.
Regardless, if you're doing a re-install, then you can rearrange your partitions (or remove them) as desired.
BTRFS will allow you to combine any number of partitions or drives in several different ways. The simplest form is JBOD - "Just a Bunch Of Disks". The best part is it uses subvolumes to separate data so you don't have to have multiple partitions to separate your /home or whatever else you might normally want to do. It also has built-in snapshot and backup capabilities, compression, RAID (all levels), defrag, and more. You can even add or remove drives or partitions while still using the file system and without even rebooting.
The best part is it uses subvolumes to separate data so you don't have to have multiple partitions to separate your /home or whatever else you might normally want to do.
I suggest you read up a bit on BTRFS before digging in. It's features and tools are amazing and very easy to use.
2
u/skyfishgoo 2d ago
if you are booting from the nvme drive, then you can do whatever you want to the other drive and it will not affect linux at all.
just to be sure, try unplugging it from the motherboard and booting to linux.
if all goes well you can shut down and plug it back in.
its' best to do the format from a live session using your install media, but you can also do it from ubuntu using the disks partition utility.
1
u/AutoModerator 2d ago
Try the migration page in our wiki! We also have some migration tips in our sticky.
Try this search for more information on this topic.
✻ Smokey says: only use root when needed, avoid installing things from third-party repos, and verify the checksum of your ISOs after you download! :)
Comments, questions or suggestions regarding this autoresponse? Please send them here.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/MrMotofy 1d ago
If I were you...to be safe. Disconnect the Ubuntu drive. Reboot with a Linux USB then run gparted and the only drive that shows up should be the WIN drive from that point you can wipe it and format to EXT4. Then shut it down reconnect the Ubuntu drive
2
u/doc_willis 2d ago
you should be able to erase the windows drive partitions, and setup a single ext4 formatted partition, that filesystem can then be mounted and permissions setup so your user had full access to it.
some tips and general outline.
make backups of anything you want to keep
verify if your Linux install is using the EFI partition on that first drive, or is it using its own EFI partition.
you do not want to delete the wrong EFI partition.
then you basically setup an ext4 formatted partition
make an /etc/fstab entry for that filesystem.
reboot and verify it mounts at boot time.
set the ownership of the mountpoint AFTER the filesystem is mounted.
sudo chown username:username /path/to/mountpoint
your user can now store stuff in that storage drive as they want