Which method for creating linux volumes is similar to using dynamic disks in windows?

Introduction

Pawan Bhardwaj MCSE, MCT, Security+, Network+, A +, in How to Cheat at Windows System Administration Using Command Line Scripts, 2006

Chapter 6 is dedicated to the Diskpart command-line utility used to manage hard disk partitions and volumes. This utility is different from other command-line utilities in that it runs in the Windows command shell as a text-based command interpreter. This utility consists of several commands that run only after the Diskpart interpreter has started. You can use this utility to perform simple disk-related tasks, such as creating and deleting partitions and volumes, and complex tasks, such as creating, maintaining, and managing fault-tolerant volumes. Because Diskpart works in a more enhanced mode than its counterpart, the Disk Management snap-in, it has more control over the selected disk, partition, or volume. Diskpart supports scripting, and you can create scripts to automate repeated disk-related administrative tasks. Diskpart error codes make it easy for you to handle command execution more precisely.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9781597491051500043

Tools of the trade

Jeremy Faircloth, in Penetration Tester's Open Source Toolkit (Third Edition), 2011

1.3.3.1 Creating a bootable USB drive using Windows 7 or Vista

This method will work to create a bootable Windows-based USB drive. As part of this, the USB drive will be formatted using NTFS. The steps described below are a step-by-step process on how to accomplish this task. Perform the following actions on an existing Windows 7- or Vista-based machine.

Warning

Issuing the wrong commands when creating bootable USB drives can format your hard disk, so be careful.

1.

Open a Command Prompt using Administrative privileges.

2.

Run the command diskpart.

3.

Enter the command list disk to determine which disk is your USB drive.

4.

Use the command select disk X where X is replaced with the number of the disk used by your USB drive.

5.

Enter the command clean to wipe the drive.

6.

Enter the command create partition primary to create a new primary partition on the USB drive.

7.

Enter the command select partition 1 to select the newly created partition.

8.

Enter the command active to mark the new partition as active.

9.

Enter the command format fs=ntfs to format the drive.

10.

Enter the commands assign and exit to complete the formatting process.

11.

Insert your Windows 7 DVD, change to the DVD drive in your command window, then change into the “boot” directory.

12.

Run the command bootsect.exe /nt60 X: where X: is the drive letter assigned to your USB drive.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9781597496278100017

Data Hiding Under Windows® OS File Structure

Nihad Ahmad Hassan, Rami Hijazi, in Data Hiding Techniques in Windows OS, 2017

Uncovering Hidden Partitions

As we said earlier, there is no way to hide the partition completely from the Computer Management console (except HPA and DCO partitions as we will see later). You can always check for hidden partitions of any plugged USB device through this console.

Another method is by using the DiskPart command line utility that comes as a part of the Microsoft Windows® family (Windows® 8, 8.1, 7, Vista, XP, and Server 2003). DiskPart is a text-mode command interpreter. This tool enables you to manage objects (disks, partitions, or volumes) by using scripts or direct input at a command prompt.

To launch this tool, open a DOS prompt, type DiskPart, and press Enter. The DiskPart utility will appear in a separate window (see Fig. 4.61).

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.61. Using DiskPart utility to uncover hidden partitions.

In Fig. 4.61 we typed List disk to view a list of connected hard disks to this PC and associated numbers (in my case I have one hard disk and two attached USB zip drives). In order to view the partition of each disk you first need to select it through the select disk  =  n command, where n points to the disk number that appears in the first command.

After selecting the disk, type list partition to see list of partitions that exist within this disk; here the hidden partition of our USB zip drive (Partition 0–1147 MB) appears.

DiskPart is a powerful tool for disk management under Windows® OS. You can learn more and see a list of command line options for this tool in the link ginen in Ref. [21].

You can restore your USB zip drive to its original state by plugging it into your PC. Go to Device Manager, right-click it, and select Properties. Go to the Driver tab and select Roll Back Driver. This will uninstall the software driver you already installed and return the old driver to this drive.

Another method to restore your old USB zip drive driver software is by using a free tool called SD Formatter [22]. Use this tool to format your USB drive and it should returns to its original state before partitioning it.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B978012804449000004X

Managing File Systems and Disks

In How to Cheat at Microsoft Vista Administration, 2007

Configuring a New Disk

In this section, we will configure and manage a new disk under Windows Vista. We will initialize the disk, create volumes, choose the file system for each volume, and even demonstrate how to shrink a volume. We’ll start by partitioning a new drive after it has been installed.

In our example (as shown in Figure 4.6), when we first installed our new drive, we decided to use the MBR partition style. After selecting the partition style, you then decide if you want to use a basic disk or dynamic disk. As you know already, we converted a basic disk to a dynamic disk using the diskpart command. Now we need to create a volume on our new drive. In disk management, we must right-click the area of the new drive labeled as unallocated (shown in Figure 4.7). As you can see, the only option we have is to create a new simple volume. Remember, the reason for this is because we only have one disk we are creating this dynamic volume for.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.7. Selecting a New Simple Volume

Now Windows Vista will run through a new simple volume wizard (as shown in Figure 4.8). At the New Simple Wizard initial screen, click Next.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.8. The New Simple Volume Wizard

Next you are asked to specify the volume size. In our example, we will only choose 4GB (see Figure 4.9). After you have specified the volume size, click Next.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.9. Specifying Volume Size

Now we assign the drive letter E to our newly created simple volume (see Figure 4.10). After doing so, click Next.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.10. Assigning a Drive Letter to a Simple Volume

Now we come to the part regarding what file system we want to format this volume with. We will cover file systems in the next section, but as you can see in Figure 4.11, we have the choice of FAT, FAT32, and NTFS. Select NTFS and change the volume label to read Simple Volume. Keep the Allocation unit size as the default. After selecting NTFS, change the volume label and click Next.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.11. Choosing the File System Type

We now come to the last screen in creating our simple volume. The Simple Volume Wizard provides us with a list of the settings we’ve chosen (see Figure 4.12). Since we know these are the settings we want, click Finish. If by chance you saw a setting you didn’t mean to select, just click the Back button to the point where you made your mistake and make the correction there.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.12. The New Simple Volume Wizard Completed

Once formatting of the new volume is complete, you should see the new simple volume listed in disk management, as shown in Figure 4.13.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.13. The New Simple Volume Is Created

Something new in Windows Vista is the ability to shrink a volume without the use of third-party software. Shrinking a volume allows administrators to easily repartition drives without having to completely remove and re-create them. To shrink a volume, go to Computer Management | Storage | Disk Management. Select the volume you intend to shrink and right-click it. You’ll see the option Shrink Volume, as shown in Figure 4.14.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.14. Shrink Volume

When you select Shrink Volume, Windows Vista will query the volume for available shrink space. Next, you will see the screen to choose what size you want to shrink the volume to. In our example, we have chosen to shrink it to 1.95GB, but it will appear as 2.05GB, as shown in Figure 4.15. Click the Shrink button.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.15. Choosing the Size for Volume Shrinkage

After Windows Vista has shrunk the volume, it will appear as shown in Figure 4.16. Our volume labeled Simple Volume is now 2.05GB, and the amount of unallocated space is up to 7.95GB.

Which method for creating linux volumes is similar to using dynamic disks in windows?

Figure 4.16. The End Results of Volume Shrinking

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9781597491747500057

Tools of the trade

Jeremy Faircloth, in Penetration Tester's Open Source Toolkit (Fourth Edition), 2017

Bootable USB Drives

In general, building a bootable USB drive is similar to creating a bootable CD or DVD. In both cases, the appropriate files and data structures must be copied to the media being used. Also, the disk must be made bootable. When burning an ISO image to an optical disk, this has frequently already been done and the boot record will be created when the image is written. This process is not automatic for USB drives and needs to be manually performed.

A number of methods exist for doing this ranging from creating a boot sector on the USB drive from Windows to creating a multiboot menu-driven system by using a variety of utilities. For our purposes, we’ll go through two examples: one for Windows and one for Linux.

Creating a bootable USB drive using Windows 10

This method will work to create a bootable Windows-based USB drive. As part of this, the USB drive will be formatted using NTFS. The steps described below are a step-by-step process on how to accomplish this task. Perform the following actions on an existing Windows 10-based machine.

Warning

Issuing the wrong commands when creating bootable USB drives can format your hard disk, so be careful. It may be wise to perform these activities on a test system or a system that you can live without, just in case.

1.

Open a Command Prompt using Administrative privileges

2.

Run the command diskpart

3.

Enter the command list disk to determine which disk is your USB drive.

4.

Use the command select disk X where X is replaced with the number of the disk used by your USB drive.

5.

Enter the command clean to wipe the drive.

6.

Enter the command create partition primary to create a new primary partition on the USB drive.

7.

Enter the command select partition 1 to select the newly created partition.

8.

Enter the command active to mark the new partition as active.

9.

Enter the command format fs=ntfs to format the drive.

10.

Enter the commands assign and exit to complete the formatting process.

11.

Run the command bootsect.exe /nt60 X: where X: is the drive letter assigned to your USB drive.

12.

When the command completes, the message “Bootcode was successfully updated on all target volumes” will return in your command window.

Creating a bootable USB drive using Linux

A number of utilities exist for performing this task under Linux and we’ll talk about one of them (UNetbootin) in the “Open Source Tools” section. However, to perform a similar process manually using Linux, you can go through the following steps:

Warning

Again, issuing the wrong commands when creating bootable USB drives can format your hard disk, so be careful.

1.

Run the command fdisk /dev/sda (assuming that your USB drive has been assigned to device sda).

2.

Enter d to delete a partition.

3.

Enter 1 to select partition #1. (If there is only one partition on the USB, it will likely be auto-selected.)

4.

Enter n and then p to create a new primary partition.

5.

Enter 1 to select partition #1 and press enter to accept the default starting cylinder.

6.

Enter the size that you’d like for your partition, for example, +4G for a 4GB partition.

7.

Enter t to change the partition type.

8.

Enter 1 to select partition #1. (It will likely be auto-selected.)

9.

Enter b to select fat32 for the partition type.

10.

Set the first partition as active by entering a followed by 1.

11.

Enter w to write the changes.

12.

Run the command mkfs.vfat /dev/sda1 to format the new partition.

13.

Run the command grub-install /dev/sda to install the GRUB bootloader onto the USB drive. (Note: For this to work, Grub must be installed. To install on Debian, run the command apt-get install grub.)

Note

These instructions are for example purposes only. Your success with these may be limited depending on the packages that you have installed and the disk layout of your individual machines.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780128021491000014

What Windows function is similar to a swap partition in Linux Unix systems?

A close analogy of the swap partition is the Windows pagefile, although there are many technical differences between the two. The Linux swap partition is not limited to being overflow storage space.

What tool can you use to convert two or more basic disks to dynamic disks?

Utility to Convert Two or More Basic Disks to Dynamic Disks You can use the Windows built-in tools that are Disk Management and diskpart.

What type of volumes or partitions can be created on a basic disk?

You can create up to four partitions on a basic disk using the MBR partition scheme: either four primary partitions, or three primary and one extended. The extended partition can contain one or more logical drives.

What feature of the GUID partitioning table GPT partitioning method offers improved reliability over the MBR partitioning method?

Features Of GPT GPT disk provides much more storage space as compared to MBR. Users can create multiple partitions. GPT disk system can create as many as 128 partitions. GPT disk system is a breakthrough when we talk about the limitation of MBR where only 4 primary partitions can be created.