Getting new hardware - can I just move the disk?
Liam Proven
lproven at gmail.com
Wed Oct 13 13:50:57 UTC 2021
On Wed, 13 Oct 2021 at 13:52, Bo Berglund <bo.berglund at gmail.com> wrote:
>
> Yesterday I used the Ubuntu desktop 20.04 live DVD, which actually boots.
Er... good? ;-)
>
> But it results in a terrible screen where it was even hard to start gparted and
> it is covered with video junk all the time.
> But I could work around it do do the job of yesterday.
Ah, yes.
> Now I am trying to separate the videos from the rest on the system drive which
> is half unallocated.
> I want to make a *data* partition formatted as ext4 on that empty space.
>
> So I need GParted, and this time I tried the "Live GParted" boot disk ISO.
> https://sourceforge.net/projects/gparted/
>
> And it is much smaller so it fits on a CD rather than DVD!
> AND it does not have this problem with the screen, all is fine and dandy with
> this tool! Much speedier than using a full Ubuntu desktop live DVD!
Excellent!
> OK step 5, so it felt like a simple job to use GParted to create the partition
> and format as ext4, but the first thing that happened is that I am asked to
> define the partition *type*, I can select among Primary, Logical and Extended
> and I have no clue as to which...
> I googled and got none the wiser...
The DOS partitioning scheme is this:
• You can have up to a maximum of 4 partitions on a hard disk.
• 1 can be marked "active"; this is the one the BIOS will try to boot from
But this is not enough. Originally the max size for a partition was
32MB (up to MS-DOS 3.3.)
So, max disk size = 128MB. Even by 1988 when I started work, and
MS-DOS 4 came out, that wasn't much.
So, they devised an extension scheme:
• 1 partition can be marked as an "extended" partition. This is a
special type and you can only have 1 per disk.
• *Inside* the extended partition, you can have "logical" partitions.
You can have as many as you want of these.
The proper, correct, legal way to partition for DOS, Win9x and NT 3.1
through to 2000 was:
- 1 primary, marked active
- 1 extended
- All other DOS & Windows partitions inside the extended partition.
*But* many OSes cannot understand or use the DOS system, e.g. FreeBSD,
Mac OS X, Novell Netware, Solaris, etc. So they must go in primary
partitions too -- but that's OK as DOS/Windows can't read their disk
formats so it just ignores them.
But XP onwards ignores all this and you can just use 2-3 primary
partitions and it works. (It made NT 3, 4 & 2000 bluescreen!)
So the knowledge is being forgotten now. Now people talk about MBR and
forget that over and above MBR there used to be additional rules.
4 primaries is bad, because you then can't create an extended
partition and rearrange stuff. So, never use 4 unless 1 is extended.
GParted can't create a secondary (logical) partition except inside an
extended partition. If you don't have an extended partition you can't
create them. It's not a GParted limit, it's a DOS/MBR limit.
> On second view it turned out only Primary was selectable!
I hope I've explained why.
> So I finished the job and also used the label as you suggested, very handy!
> Now I will have to copy all of the videos to the new drive and then erase tham
> from the source.
> I will use rsync for this.
Fair enough.
> And shrink the system partition again to make room for another data partition of
> some 120 GB or so.
> Again the GParted Live CD! :-)
Yup.
> Question:
> ---------
> The videos are inside the $HOME/www folder in various subdirectories below that.
> I have a couple of websites running on this server and they typically have
> symlinks like this:
>
> /var/www/video.boberglund.com/public_html -> /home/username/www/videos
>
> Will this work also when the videos folder is a mount point for the drive I will
> move my videos to?
You could put all your videos right in the root directory if you want
but it's probably neater to create a folder.
Then mount the drive anywhere you like, and symlink the videos folder
E.g. you could make a folder called /videos on your new disk, let's
call it /dev/sda3
Then mount /dev/sda3 onto /mnt/vidpart
Remove the old videos folder:
rm /home/username/www/videos
And symlink the folder:
ln -s /mnt/vidpart/videos /home/username/www/videos
-- that should work.
Others may disagree and I am happy to be corrected on this part. :-)
--
Liam Proven ~ Profile: https://about.me/liamproven
Email: lproven at cix.co.uk ~ gMail/gTalk/FB: lproven at gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
UK: (+44) 7939-087884 ~ Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053
More information about the ubuntu-users
mailing list