maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   16GB miniSD issue!!! HELP! (https://talk.maemo.org/showthread.php?t=57048)

HeavyComponent 2010-06-28 21:34

Re: 16GB miniSD issue!!! HELP!
 
woody14619,

Thanks for the reply, I will try right away and post back on the results.

HeavyComponent 2010-06-28 21:51

Re: 16GB miniSD issue!!! HELP!
 
Quote:

Originally Posted by woody14619 (Post 733186)
Try this, in a root terminal (this will format the card!). you should be able to cut/paste it right into a root terminal. (Be sure you're root first, via root or gainroot!)

Code:

sfdisk /dev/mmcblk1 <<EOF
,,c
EOF
sync
mkfs.vfat /dev/mmcblk1p1
sfdisk -d /dev/mmcblk1

That should show you've created a new partition, and formatted it to vfat.

Before I continue this is what I got so far. I stopped after the 3rd line "EOF". This what showed up and I wanted to know is it safe to continue?

Code:

/home/user # sfdisk /dev/mmcblk1 <<EOF
> ,,c
> EOF
Checking that no-one is using this disk right now ...
BLKRRPART: Device or resource busy

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.
Use the --force flag to overrule all checks.
/home/user #

Now what?

woody14619 2010-06-28 22:04

Re: 16GB miniSD issue!!! HELP!
 
Quote:

Originally Posted by HeavyComponent (Post 733249)
Before I continue this is what I got so far. I stopped after the 3rd line "EOF". This what showed up and I wanted to know is it safe to continue?

So it's mounted? That's really odd...

Try this (and again, be sure you are root!)

Code:

root
umount /dev/mmcblk1

That should unmount everything. They try this block again:

Code:

sfdisk /dev/mmcblk1 <<EOF
,,c
EOF
sync
mkfs.vfat /dev/mmcblk1p1
sfdisk -d /dev/mmcblk1

Worst case, use the --force flag, just make sure you're saying mmcblk1 and NOT mmcblk0! mmcblk0 is your internal OS!

HeavyComponent 2010-06-28 22:09

Re: 16GB miniSD issue!!! HELP!
 
woody14619,

Ok lets say I have to use the force flag. How do I do that?

EDIT: Tried the umount and this is what I got.

Code:

/home/user # umount /dev/mmcblk1
umount: cannot umount /dev/mmcblk1: Invalid argument
/home/user #


woody14619 2010-06-28 22:19

Re: 16GB miniSD issue!!! HELP!
 
Quote:

Originally Posted by HeavyComponent (Post 733273)
woody14619,

Ok lets say I have to use the force flag. How do I do that?

EDIT: Tried the umount and this is what I got.

Code:

/home/user # umount /dev/mmcblk1
umount: cannot umount /dev/mmcblk1: Invalid argument
/home/user #


Just throw it into the command between sfdisk and the device name. :) I'm more concerned about the fact that it thinks it's in use. As root just try typing mount and see if it's listing anything for /dev/mmcblk1. If it is, try umounting that by name. (For example, it may have /dev/mmcblk1p1 mounted? But the previous command said it had no partitions, so...)

HeavyComponent 2010-06-28 22:26

Re: 16GB miniSD issue!!! HELP!
 
Ok woody14619,

At root just typed "mount".

Code:

/home/user # mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,bulk_read,no_chk_data_crc)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,noatime,size=1024k)
tmpfs on /var/run type tmpfs (rw,nosuid,noatime,size=256k,mode=755)
none on /dev type tmpfs (rw,noatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noatime,size=65536k)
/dev/mmcblk0p2 on /home type ext3 (rw,noatime,errors=continue,commit=1,data=writeback)
/home/opt on /opt type none (bind)
nodev on /sys/kernel/debug type debugfs (0)
/opt/pymaemo/usr/lib/python2.5 on /usr/lib/python2.5 type bind (bind)
/opt/pymaemo/usr/share/pyshared on /usr/share/pyshared type bind (bind)
/opt/pymaemo/usr/lib/pyshared on /usr/lib/pyshared type bind (bind)
/opt/pymaemo/usr/share/python-support on /usr/share/python-support type bind (bind)
/opt/pymaemo/usr/lib/python-support on /usr/lib/python-support type bind (bind)
/dev/mmcblk0p1 on /home/user/MyDocs type vfat (rw,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir)
/dev/mmcblk1p1 on /media/mmc1 type vfat (rw,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir)


fnordianslip 2010-06-28 22:32

Re: 16GB miniSD issue!!! HELP!
 
Isn't it mmcblk1p1 for the FAT32 partition on the uSDHC card on the N900?

If so, "umount /media/mmc1" as root, followed by the other stuff, as appropriate, should (probably) work.

Note that /dev/mmcblk1p1 is the first partition on /dev/mmcblk1 and /media/mmc1 is the directory it gets mounted to.

Edit: beer induced typo corrected for the benefit of humanity..

HeavyComponent 2010-06-28 22:36

Re: 16GB miniSD issue!!! HELP!
 
fnordianslip,

Did the "umount /media mmc1"

Code:

/home/user # umount /media mmc1
umount: cannot umount /media: Invalid argument
umount: cannot umount mmc1: No such file or directory
/home/user #


woody14619 2010-06-28 22:50

Re: 16GB miniSD issue!!! HELP!
 
Quote:

Originally Posted by HeavyComponent (Post 733293)
Ok woody14619,

At root just typed "mount".

Code:

/dev/mmcblk1p1 on /media/mmc1 type vfat (rw,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir)

Hmm.. thats odd, since the sfdisk command output you showed bfore said it had no partitions on the device... Yet now it's saying it has a partition mounted. Well, this should do it for you:

Code:

umount /dev/mmcblk1p1
sfdisk /dev/mmcblk1 <<EOF
,,c
EOF
sync
mkfs.vfat /dev/mmcblk1p1
sync
sfdisk -d /dev/mmcblk1

The output the the last command should show you have a partition, formatted properly. Then a quick reboot (or open your back cover and replace it) and you should be all set.

fnordianslip 2010-06-28 22:50

Re: 16GB miniSD issue!!! HELP!
 
Aargh. Sorry. Been drinking :) Not helpfull, I know, but at least I'm trying ...

"umount /media/mmc1" should do it.


All times are GMT. The time now is 23:20.

vBulletin® Version 3.8.8