LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-14-2012, 01:18 AM   #1
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Rep: Reputation: Disabled
1.0 GB USB showing total capacity 69.8 MB


Hi,

I have to copy my root file system and linux kernel on a 1 GB flash drive.
But it is showing a total capacity of 69.8 MB.
Out of which, it shows 36.4 MB used and 33.4 MB free although it is empty.

Where does the problem lie?
 
Old 07-14-2012, 01:38 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
What command(s) did you use ?. Exactly.
 
Old 07-14-2012, 02:33 AM   #3
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
I didn't get you.
Commands for what??
 
Old 07-14-2012, 03:00 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Sorry, I misread your post - I thought you had copied ...

That looks like a USB that has been dd'd to. Have you ever done that ?. Let's see a "fdisk -l" (as root).
 
Old 07-14-2012, 03:23 AM   #5
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
No, I never did that. I am new to linux so I dont know much commands on linux.

[root@ash ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3ffc3ff

Device Boot Start End Blocks Id System
/dev/sda1 * 722925 271177199 135227137+ 7 HPFS/NTFS/exFAT
/dev/sda2 271177728 480888831 104855552 5 Extended
/dev/sda3 974502272 976773167 1135448 12 Compaq diagnostics
/dev/sda4 480889710 974502271 246806281 7 HPFS/NTFS/exFAT
/dev/sda5 271181824 464111615 96464896 83 Linux
/dev/sda6 464113664 480888831 8387584 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 1014 MB, 1014644736 bytes
32 heads, 63 sectors/track, 983 cylinders, total 1981728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 63 1980719 990328+ 6 FAT16
[root@ash ~]#
 
Old 07-14-2012, 03:32 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
That looks o.k. - what prompted you to post the following ?.
Quote:
Originally Posted by ashangel View Post
... a 1 GB flash drive.
But it is showing a total capacity of 69.8 MB.
Out of which, it shows 36.4 MB used and 33.4 MB free although it is empty.
 
Old 07-14-2012, 03:37 AM   #7
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
I copied root file system rootfs.ext3 to the usb.
Then I stripped vmlinux.64 and copied it to the USB.
During copying, the process stopped. It said not enough space.

I then deleted both the file system and the kernel from the USB.
Now I want to do the whole procedure again but I doubt I will again face the problem.
 
Old 07-14-2012, 03:39 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
With that mounted, let's see a "df -hT"
 
Old 07-14-2012, 04:03 AM   #9
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
[root@ash ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 92G 12G 80G 13% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 720K 2.0G 1% /dev/shm
tmpfs 2.0G 1.2M 2.0G 1% /run
/dev/sda5 92G 12G 80G 13% /
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 0 2.0G 0% /media
/dev/sdb1 67M 32M 32M 50% /run/media/aisha/f1213b40-31f0-4f6f-b4bb-1b96b724b5cd
[root@ash ~]#
 
Old 07-14-2012, 04:14 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
That has to be a filesystem issue.

Presuming you don't need that data, reformat it to something sensible - say ext3/4. By default mkfs will use the entire partition.
 
Old 07-14-2012, 04:38 AM   #11
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
I run the mount command and it gave the following output:

[root@ash ~]# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1985224k,nr_inodes=496306,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,seclabel,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
gvfs-fuse-daemon on /run/user/aisha/gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /run/media/aisha/f1213b40-31f0-4f6f-b4bb-1b96b724b5cd type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)

As you can see, the type of the usb is already ext 3
 
Old 07-14-2012, 04:46 AM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
If you'd run the "df" command I requested, we could have seen that then - doesn't matter, run the mkfs anyway.

Would make sense to change the partition type to Linux (x'83') as well for consistency.
 
Old 07-14-2012, 05:36 AM   #13
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
I have copied the fdisk -l command below again for you. I see it shows that /dev/sdb1 is FAT16 while the mount command shows that type is ext3. this is quiet conflicting. anyways, i will do the mkfs command.

[root@ash ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3ffc3ff

Device Boot Start End Blocks Id System
/dev/sda1 * 722925 271177199 135227137+ 7 HPFS/NTFS/exFAT
/dev/sda2 271177728 480888831 104855552 5 Extended
/dev/sda3 974502272 976773167 1135448 12 Compaq diagnostics
/dev/sda4 480889710 974502271 246806281 7 HPFS/NTFS/exFAT
/dev/sda5 271181824 464111615 96464896 83 Linux
/dev/sda6 464113664 480888831 8387584 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 1014 MB, 1014644736 bytes
32 heads, 63 sectors/track, 983 cylinders, total 1981728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 63 1980719 990328+ 6 FAT16


[root@ash ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 92G 12G 80G 13% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 720K 2.0G 1% /dev/shm
tmpfs 2.0G 1.2M 2.0G 1% /run
/dev/sda5 92G 12G 80G 13% /
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 0 2.0G 0% /media
/dev/sdb1 67M 32M 32M 50% /run/media/aisha/f1213b40-31f0-4f6f-b4bb-1b96b724b5cd
 
Old 07-14-2012, 05:48 AM   #14
ashangel
LQ Newbie
 
Registered: Jul 2012
Location: Home
Posts: 19

Original Poster
Rep: Reputation: Disabled
Why should I run the mkfs command??

I guess it will change the file system type of my USB.

Will it be ok to change it?
If so, please tell me what fily type should I choose??
 
Old 07-14-2012, 09:35 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
mkfs does not automatically change the partition ID type. Yes, use 83.
mkfs should reformat using the entire drive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing Total RAM consumed even OS is in Ideal State pramodhrai Linux - Software 2 05-11-2012 06:45 AM
[SOLVED] hdd total capacity JJJCR Linux - Newbie 4 04-24-2012 04:58 AM
RHEL5.3 is not showing total physical memory JATA01 Linux - Hardware 7 08-27-2010 04:31 AM
Hard Drive showing incorrect capacity xer Linux - Hardware 7 12-27-2006 10:03 PM
Debian 3.1 not detecting total capacity & will not mount drive Mr54mk Debian 6 02-03-2006 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration