让我的MP3可以在magiclinux下mount
我的一个MP3(爱国者aigo月光宝盒)一直不能在在magiclinux下mount提示不是合法的块设备,后来听说对mp3重新分区和格式化可以解决这个
问题,就决定试试。
首先进行备份,当然是用dd了
dd if=/dev/sda of=~/mp3img
# dd if=/dev/sda of=~/mp3img
读入了 245473+0 个块
输出了 245473+0 个块
接着fdisk -l /dev/sda 看一下,哦有4个分区,每个分区都是主分区,从
sda1到sda4
但是分区类型为Unknow
fdisk /dev/sda
先用命令o create a new empty DOS partition table
接着用命令n 建立4个主分区,分区大小吗,把尽量大的空间都留给sda1
sda2到sda4都只有1个cylinders就可以了
再用命令t修改所有分区的分区类型为6 FAT16(因为window下看到的mp3原来的分区类型为FAT)
有w写盘退出
下面格式化各个分区
mkfs.msdos /dev/sda1
mkfs.msdos /dev/sda2
mkfs.msdos /dev/sda3
mkfs.msdos /dev/sda4
fdsik -l 看看
Disk /dev/sda: 125 MB, 125682176 bytes
4 heads, 60 sectors/track, 1022 cylinders
Units = cylinders of 240 * 512 = 122880 bytes
Device Boot Start End Blocks IdSystem
/dev/sda1 1 1019 122250 6FAT16
/dev/sda2 1020 1020 120 6FAT16
/dev/sda3 1021 1021 120 6FAT16
/dev/sda4 1022 1022 120 6FAT16
好了拷歌听听
mount /dev/sda1 /mnt/flash
cp ~/mp3/* /mnt/flash
ls /mnt/flash
# ls /mnt/flash
0光阴的故事.WMA4波斯猫.mp3 十年.mp3 日语动画 红尘有你-王杰.mp3
1ANDY(阿杜).wmarec01.wav 十面埋伏-古筝.mp3来吧-韩红.wma
2无言的温柔.mp3丁香花.mp3 后来刘若英.mp3 水晶1.mp3
3神啊救救我.mp3乱了感觉.mp3断点.mp3 红.mp3
umount /dev/sda1
听歌正常
到别的机器windows下试试,也正常,大功告成
(注,对于我的mp3如果只分一个分区,只有sda1是没办法听歌的,一定要有4个主分区。如果你的mp3和我的不是同一种,具体分几个区,分区类型是什么,就可能不一样了。) fdisk /dev/sda
先用命令o create a new empty DOS partition table
接着用命令n 建立4个主分区,分区大小吗,把尽量大的空间都留给sda1
sda2到sda4都只有1个cylinders就可以了
再用命令t修改所有分区的分区类型为6 FAT16(因为window下看到的mp3原来的分区类型为FAT)
有w写盘退出
是什么意思! 我现在听不了MP3只有MP3只有U盘的作用,大哥楼主您在那里哟???????????
fdisk /dev/sda
先用命令o create a new empty DOS partition table
接着用命令n 建立4个主分区,分区大小吗,把尽量大的空间都留给sda1
sda2到sda4都只有1个cylinders就可以了
再用命令t修改所有分区的分区类型为6 FAT16(因为window下看到的mp3原来的分区类型为FAT)
有w写盘退出
说详细点,最好加点图片! 快要哭出来了~~~~~~~~~~~~~~~~~~~大哥大姐帮帮我嘛 o n w t,都是fdisk的命令,进了fdisk后会有提示,按提示操作就行了,还有m是列出命令的说明,fdisk还是很简单的,因为我是在命令模式下操作的,不方便拷屏。
如果出了问题可以把第一步的备份再倒回去
dd if=~/mp3imgof=/dev/sda
你的mp3就跟没动过一样了 fdisk /dev/sda
1。先用命令o create a new empty DOS partition table:
---------------------
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help):
---------------------------
2。接着用命令n 建立4个主分区,分区大小吗,把尽量大的空间都留给sda1
--------------------------
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1006, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1006, default 1006): 1003
Command (m for help):
--------------------------------------
(共有1006个cylinder,1-1003为sda1,1004为sda2,1005为sda3,1006为sda4)
接着sda2:
----------------------
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1004-1006, default 1004): 1004
Last cylinder or +size or +sizeM or +sizeK (1004-1006, default 1006): 1004
Command (m for help):
----------------------------
接着一样是sda3 sda4
sda2到sda4都只有1个cylinders就可以了
3.再用命令t修改所有分区的分区类型为6 FAT16(因为window下看到的mp3原来的分区类型为FAT)
---------------------------
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)
Command (m for help):
-----------------------------------------
2到4同样操作
用命令l可以看分区类型的代码
----------------
Command (m for help): l
0Empty 1cHidden W95 FAT3 70DiskSecure Mult bbBoot Wizard hid
1FAT12 1eHidden W95 FAT1 75PC/IX beSolaris boot
2XENIX root 24NEC DOS 80Old Minix c1DRDOS/sec (FAT-
3XENIX usr 39Plan 9 81Minix / old Lin c4DRDOS/sec (FAT-
4FAT16 <32M 3cPartitionMagic82Linux swap c6DRDOS/sec (FAT-
5Extended 40Venix 80286 83Linux c7Syrinx
6FAT16 41PPC PReP Boot 84OS/2 hidden C:daNon-FS data
7HPFS/NTFS 42SFS 85Linux extendeddbCP/M / CTOS / .
8AIX 4dQNX4.x 86NTFS volume set deDell Utility
9AIX bootable 4eQNX4.x 2nd part 87NTFS volume set dfBootIt
aOS/2 Boot Manag 4fQNX4.x 3rd part 8eLinux LVM e1DOS access
bW95 FAT32 50OnTrack DM 93Amoeba e3DOS R/O
cW95 FAT32 (LBA) 51OnTrack DM6 Aux 94Amoeba BBT e4SpeedStor
eW95 FAT16 (LBA) 52CP/M 9fBSD/OS ebBeOS fs
fW95 Ext'd (LBA) 53OnTrack DM6 Aux a0IBM Thinkpad hi eeEFI GPT
10OPUS 54OnTrackDM6 a5FreeBSD efEFI (FAT-12/16/
11Hidden FAT12 55EZ-Drive a6OpenBSD f0Linux/PA-RISC b
12Compaq diagnost 56Golden Bow a7NeXTSTEP f1SpeedStor
14Hidden FAT16 <3 5cPriam Edisk a8Darwin UFS f4SpeedStor
16Hidden FAT16 61SpeedStor a9NetBSD f2DOS secondary
17Hidden HPFS/NTF 63GNU HURD or Sys abDarwin boot fdLinux raid auto
18AST SmartSleep64Novell Netwareb7BSDI fs feLANstep
1bHidden W95 FAT3 65Novell Netwareb8BSDI swap ffBBT
Command (m for help):
--------------------------
4。有w写盘退出
-----------------------
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks. 老大就是老大!!!!!!!!!!!!
你真实厉害@@@@@@@@@@
真实佩服!
以后跟定你了! :oops: 我真正开始用linux才一年多,很多都不懂的 通过这个方法,我了解了fdisk的用法^_^!
谢谢您
页:
[1]