<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Partition on Michael’s Domain</title><link>https://jeltsch.org/en/tags/partition/</link><description>Recent content in Partition on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/partition/index.xml" rel="self" type="application/rss+xml"/><item><title>Is Ubuntu 18.04 still using the SSD drive for swap?</title><link>https://jeltsch.org/en/is_ubuntu_18_04_still_using_the_ssd_drive_for_swap/</link><pubDate>Fri, 10 May 2019 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/is_ubuntu_18_04_still_using_the_ssd_drive_for_swap/</guid><description>&lt;p&gt;In an Ubuntu 18.04 two disk setup (/ on SSD, /home on spinning drive), my Ubuntu 18.04 has still defaulted to use swap space on the SSD although there was a swap partition of the same size on the spinning drive. This was not a new install, but a system upgrade from 16.04 (where I had created a swap partition manually on the spinning drive to spare the SSD). Linux is able to determine whether a drive is spinning or not, but apparently the installation/upgrade script was not very smart.What swap partitions are available?&lt;code&gt;sudo fdisk -l[…]Disk /dev/sda: 74,5 GiB, 80026361856 bytes, 156301488 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x34836041Device Boot Start End Sectors Size Id Type/dev/sda1 * 2048 148054782 148052735 70,6G 83 Linux/dev/sda2 148056062 156301311 8245250 4G 5 Extended/dev/sda5 148056064 156301311 8245248 4G 82 Linux swap / SolarisDisk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xf6870277Device Boot Start End Sectors Size Id Type/dev/sdb1 2048 8390655 8388608 4G 82 Linux swap / Solaris/dev/sdb2 8390656 1953525167 1945134512 927,5G 83 Linux[…]&lt;/code&gt;Checking which drive is the SSD:&lt;code&gt;cat /sys/block/sda/queue/rotational0cat /sys/block/sdb/queue/rotational1&lt;/code&gt;Which swap partition is used?&lt;code&gt;more /etc/fstab[…]# swap was on /dev/sda5 during installationUUID=fdb5ad84-f758-4326-a6c8-7adf91d21079 none swap sw 0 0[…]Check whether the UUID corresponds to the SSD:sudo blkid /dev/sda5/dev/sda5: UUID=&amp;quot;fdb5ad84-f758-4326-a6c8-7adf91d21079&amp;quot; TYPE=&amp;quot;swap&amp;quot; PARTUUID=&amp;quot;34836041-05&amp;quot;&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Mounting individual partitions from disk dumps</title><link>https://jeltsch.org/en/mounting_individual_partitions_from_disk_dumps/</link><pubDate>Thu, 26 Dec 2013 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/mounting_individual_partitions_from_disk_dumps/</guid><description>&lt;p&gt;You can make disk dumps from individual partitions or from a hard drive that contains more than one partition. The ladder has the advantage that you can restore the computer by dumping back the image onto the same or another hard drive. But if you want to access an individual partition from a hard drive image, you need to know where the partition boundaries are. You can note them down from the output of fdisk. However, fdisk -l gives the partition boundaries, but the unit is sectors. You need to multiply this number by the logical sector size to get the partition boundaries in bytes.Alternatively you can use 
 &lt;a href="http://www.gnu.org/software/parted/" target="_blank" rel="noopener noreferrer nofollow"&gt;parted&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 (after invoking parted, execute commands unit, B, print in that order) to display the partition boundaries in byte. parted can be also used on a disk dump, e.g. parted /home/backups/diskdump.img to determine the partition boundaries.&lt;code&gt;jeltsch@Michael:~$ sudo parted /home/backup/diskdump.img GNU Parted 2.3Using /home/backup/diskdump.imgWelcome to GNU Parted! Type 'help' to view a list of commands.(parted) unit Unit? [compact]? B (parted) print Model: (file)Disk /home/backup/diskdump.img: 160041885696BSector size (logical/physical): 512B/512BPartition Table: msdosNumber Start End Size Type File system Flags 1 1048576B 524287999B 523239424B primary ntfs boot 2 524288000B 80282124287B 79757836288B primary ntfs 3 80283171840B 160041009151B 79757837312B extended 5 80283172864B 122626684415B 42343511552B logical ext4 7 122626768896B 157924769279B 35298000384B logical ext4 6 157932322816B 160041009151B 2108686336B logical linux-swap(v1)(parted)&lt;/code&gt;Then you just mount the image as a loop device with the additional parameter offset using the start boundary of the partition you want to mount:&lt;code&gt;sudo mount -o loop,ro,offset=524288000 /home/backup/diskdump.img /mnt&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Some partition rearrangements under Linux</title><link>https://jeltsch.org/en/some_partition_rearrangements_under_linux/</link><pubDate>Sat, 26 May 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/some_partition_rearrangements_under_linux/</guid><description>&lt;p&gt;The Linux installation is as follows:&lt;code&gt;/dev/hdb1 100 MB /boot/dev/hdb2 8 MB /home/dev/hdb3 8 MB //dev/hdb4 Extended partition/dev/hdb5 1 GB Linux swap/dev/hdb6 100 GB NTFS&lt;/code&gt;The idea was to use the 100 GB partition (/dev/hdb6), which has been formatted with the NTFS (= Windows 2000) file system to store large files under Linux. NTFS file systems cannot be used by Linux yet. The only DOS/Windows filesystem, that is compatible with Linux is FAT32. Unfortunately FAT32 is a quite inefficient system and has a maximal partition size of 32 GB (actually Windows can use FAT partitions up to 127 GB, but it cannot format them itself, one needs a third party utility to format them). Anyhow, Linux can only read and write to FAT partitions up to 32 GB. An additional requirement is that /dev/hdb6 should be mounted to two different mount points. Therefore we have to split this partition into 2 smaller ones. Now this appeared to be impossible under Linux. The reason of this is - like with so many other things that suck - Bill Gates. Similar to his &amp;ldquo;640KB RAM is enough for everybody&amp;rdquo; decision, he decided that only four primary DOS-type partitions can be on one physical hard drive. Soon this appeared to be too little and thus a work-around was introduced: &amp;ldquo;Extended Partitions&amp;rdquo;. One of the four primary partitions of a disk can be a so-called &amp;ldquo;extended partition&amp;rdquo; and contain several (actually I think unlimited amount of) logical partitions. Thus in the above layout of the hard disk /dev/hdb partition number 4 (/dev/hdb4) is an extended partition. It contains two logical partitions: /dev/hdb5 and /dev/hdb6. The problem is the following: The Linux utilities cfdisk and fdisk cannot access these two logical partitions separately. If we want to split /dev/hdb6 into two smaller partitions, we first have to delete this partition and then create two new ones in its place. But both cfdisk and fdisk can only delete /dev/hdb4 as a whole. That would delete the Linux swap partition (quite a disaster while you are running the operating system).The way how to solve the problem is the following: Boot into Windows 2000, delete the 100 GB NTFS partition and created two smaller ones instead (/dev/hdb6 and /dev/hdb7). You have to format them FAT32 or NTFS as Windows cannot do anything else. If you have Partition Magic 8 or higher (preferably on a boot floppy), you can immediately format the two new smaller partitions as Linux partitions (that is: ext2 or ext3). Reboot into Linux. Funnily when mounting the partitions that were formatted using Partition Magic 8, already 5 percent of the space is already occupied although there are no files anywhere (at least this is what the Hardware Browser/Hard Drives utility shows). To reclaim this lost space you have to reformat them under Linux using the command mkfs.ext3 /dev/hdb6. If you want to use the newest (and probably one of the best) file system for Linux, you can format them with the ReiserFS file system (command: mkfs.reiserfs /dev/hdb6). Reboot and add those partitions into the fstab file to automount them on startup.&lt;/p&gt;</description></item></channel></rss>