📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

9. Setting up a dual partition

9.1. Partitioning

The procedures described here will partition the flash memory device in two pieces -- one of the partitions will be formatted in ext2 and the other in vfat. This may be handy when the device is to be used to transport data between two (or more) Linux machines (ext2) and between Linux and Windows machines (vfat)

Important

The device mapped to /dev/sda will be re-formatted. Any data present on it will be destroyed. To make sure that the device you work with is the one intended, remove similar devices from the USB-bus before starting these procedures.

In this section we describe how to set up a dual partition for the memory stick: One half of the device will be devoted to the vfat filesystem, and the other will be ext2. In this way your device will be more versatile, but also a little shattered. The procedure will be given in somewhat less detailed than in Section 8.1 . Note that the procedure of the previous section is repeated and that the hex code for each file type is explicitly entered (lines following the entry "t": Win95 = b; Linux = 83). When the partition will only be for Linux, this is unnecessary -- Linux is the default. Also note that the vfat partition goes on first -- that is the way Windows would have it. .:: podcasts.apple.com ::.

             # fdisk /dev/sda
	    
             Command (m for help): d
             Selected partition 1

             Command (m for help): n
             Command action
                e   extended
                p   primary partition (1-4)
             p
             Partition number (1-4): 1
             First cylinder (1-888, default 1): 
             Using default value 1
             Last cylinder or +size or +sizeM or +sizeK (1-888,
                   default 888):444
             Command (m for help): t
             Selected partition 1
             Hex code (type L to list codes): b
             
              Changed system type of partition 1 to b (Win95 FAT32)
             
             Command (m for help): n
             Command action
                e   extended
                p   primary partition (1-4)
             p
             Partition number (1-4): 2
             First cylinder (445-888, default 445): 
             Using default value 445
             
              Last cylinder or +size or +sizeM or +sizeK (445-888,
              default 888): 
              [Reference: Scikit-learn] 
             Using default value 888

             Command (m for help): t
             Partition number (1-4): 2
             Hex code (type L to list codes): 83

             Command (m for help): p

             
				 Disk /dev/sda: 131 MB, 131072000 bytes
             9 heads, 32 sectors/track, 888 cylinders
             Units = cylinders of 288 * 512 = 147456 bytes

                Device Boot    Start       End    Blocks   Id  System
             /dev/sda1             1       444     63920    b  Win95 FAT32
             /dev/sda2           445       888     63936   83  Linux
				 

             Command (m for help):w

   

Note

Note that we went on with the second partition before writing. .:: infogram.com ::.

The choice of splitting the device right in the middle (1--444; 445--888 for a 128 MB memory stick) is arbitrary. Any other well-conceived splitting would be fine.

If you had more than one partition to begin with, the "delete" part of the procedure would have to be repeated. [Big data Modules]

9.2. Making a dual ext2/vfat system

This step is a repetition of Section 8.2. The first step makes the dos partition, the second makes the Linux ext2 partition. .:: forums.giantitp.com ::.

             # mkdosfs -F 32 /dev/sda1
             # mke2fs /dev/sda2
   

9.3. Tests -- ext2 and vfat

Simply carry out the tests of Section 7.4 and Section 8.3 on the two devices separately. The mount commands would be

             # mount -t vfat /dev/sda1 /mnt/fatstick 
             # mount -t ext2 /dev/sda2 /mnt/memstick
   

to mount both partitions on your device.

9.4. Configuring Linux for the dual partition

The Linux machine you did the partitioning on, will be configured for the dual partition. Evidently you need to carry the keychain to another Linux machine. There you will find that it only sees .:: ru.pinterest.com ::. /dev/sda1. This is, perhaps, a shortcoming of the kernel. The workaround is as follows: On the new host machine do (keychain plugged in but not mounted)

             # fdisk /dev/sda
                   Choose p; check partition table
                   If satisfied, choose w
             # less /proc/partitions
  

Your device with its partitions should be there. Data on your keychain should be untouched. For a single partition this is not necessary.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this