Linux Lite Forums

General => Off Topic => Topic started by: vint on June 08, 2022, 08:19:01 PM

Title: Setting up a partition for linux snapshots on WD 1tb passport
Post by: vint on June 08, 2022, 08:19:01 PM
I purchased a WD 1 tb external hdd and I use it for W7 backups and disc images.  How do I partition it so it can be used for Linux Lite snapshots.  I dual boot W7hp with LL 5.8.  I have files and such from windows on it right now that I don't want to loose.  Is it possible to partition some of it for linux.

God Bless Texas
Title: Re: Setting up a partition for linux snapshots on WD 1tb passport
Post by: trinidad on June 09, 2022, 12:49:13 PM
I've done it, but not for many years, and in some ways that part of my brain has become abandonware just like the software I used back then to do it, (maybe ext2fs & double commander for Windows) to map the partition as a separate drive. Because you are using it for Windows backup you must defragment it and do the partitioning from Windows first and probably format the Linux part as fat32. There are many nit-picky and qualifying factors involved in the process. I would search and then ask at W7 forum.


Title: Re: Setting up a partition for linux snapshots on WD 1tb passport
Post by: stevef on June 09, 2022, 01:05:41 PM
Repartitioning drives is usually ok but there is some risk of data loss.
You may want to save any data on the Windows partition you really can't afford to lose elsewhere before starting.

Boot up Linux Lite
Assuming the WD 1TB is a straight forward USB disk plug it in.

Click Menu -> Settings -> Disks

This should bring up a window with a list of disks on the LHS and a message saying 'No disk selected' in the space on the right.

Check the LHS list of disks section and click on the WD 1TB external HD.
Double check you have selected the correct drive.

The RHS will be a graphic showing the volume partitions and status.
Above the graphic is information related to the physical disk
Below the graphic is information related to the partitions.
If there are multiple partitions click each to try to determine what it does.

Edit -> If you don't understand what each does report back.

The largest will be likely be the one where you are saving W7 backups.

Look at the 'Contents' & 'Partition Type' of the largest partition.
If the Contents = Ext4 and the Type = Linux Filesystem then it would be suitable but that's unlikely and you will need to shrink it to make some room.
You will need to balance how much to shrink the Windows partition to allow it still to be useful, while creating enough space for the Linux snapshots.

If the Windows partition is mounted then there should be an indication of how much free space the partition has is under 'Size' (below the graphic).
If it is umounted, then you need to temporarily mount it using the button with the triangular mark below the graphic to get this information.

Having decided how small you want to make the windows partition ensure it is unmounted (with the button with the square if necessary) so that the Contents states 'Not Mounted'.

Ensuring the correct partition is selected, click the button with the cogs to bring up a menu of possible things to do with the partition.

select Resize - this brings up a graphic to set the new smaller size of the Windows partition along with suitable warnings of the risk.
When setting the size remember to leave enough space for the current W7 contents plus some expansion.
'Free Space' on this graphic refers to the free space you are creating for your Linux snapshots, not how much free space will be on the shrunken partition.

Clicking Resize will action the change - wait for this to complete

Select the new 'Free Space' you just made and then click the button with the + symbol to create a new partition in that space.
Ensure the size is maximum then click next.
Give the Volume a name (if you want) and ensure the Type 'Internal disk for use with Linux only (ext4)' is selected

Clicking Create will action this change and your drive will now have a (smaller) Windows space and an Ext4 partition which something like timeshift can use.
Title: Re: Setting up a partition for linux snapshots on WD 1tb passport
Post by: trinidad on June 09, 2022, 03:06:32 PM
I do NOT recommend repartitioning the external disk from Linux since you are using it for Windows 7 backups. It may not restart from Windows 7 afterwards if you are booting it with the system, or dump you into boot repair or just error out and force an MS fix on you when you plug it back in that will overwrite your Linux changes. Do the initial re-partitioning with Windows first. Once that is done you will probably be able to use Linux to set the new partition type so your LL can use part of it for backups. But by all means, if you must, forge onward as Steve describes and slam MS with the power of Linux until it dies like a lot of other unfortunate people actually do. You have noted that you wish to preserve your Windows 7 functionality on the drive. Defragment and partiton the disk from Windows. Make the new partion free space or fat32. Shut down Windows. Boot Linux and make the partition ext4 if you like, though that is not neccessary either for Linux backups.

Title: Re: Setting up a partition for linux snapshots on WD 1tb passport
Post by: vint on June 10, 2022, 07:12:15 PM
Thanks for the awesome info gentleman, this a lot to digest.  I read somewhere that snapshots had to be backed up to ext4 that is the reason for the inquiry.  It might be easier to purchase another external drive just for Linux Lite.  The thing is I have almost 900gb unused on the drive

Best regards, Vint