Notices


Reply
Thread Tools
Posts: 262 | Thanked: 315 times | Joined on Jun 2010
#191
I had created and mkswapped my swap partitions 'on device' - finally fixed it last night after seeing your post about this problem.

Perhaps it would be quite trivial to check that the SD swaps had UUIDs on startup?
 

The Following User Says Thank You to Xagoln For This Useful Post:
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#192
I am experiencing the same result with fw190 although flopswap correctly sets swap_sd="1".
I used to have flopswap install with 1.2GB swaps. A few days ago I decided to flash my n900 because of reboots I couldn't solve. I made swaps of 1GB this time. That's the only difference I can think of. Can you please help me get flopswap running normally again?

Code:
/home/user # blkid | grep swap
/dev/mmcblk1p2: TYPE="swap" LABEL="sdswap1" UUID="2c50fce7-3cf6-436d-bbcd-f8e8eb86a2c6"
/dev/mmcblk1p3: TYPE="swap" LABEL="sdswap2" UUID="381b9bcb-84a7-40f1-b949-4ae7a0550d49"
/dev/mmcblk0p3: TYPE="swap" UUID="a9c6b09e-4e9e-46e3-974d-462c9f03d3ac"
/home/user # dpkg-query -W -f='${Version}\n' upstart
0.3.8-68+0cssu7
/home/user # cat /etc/default/mount-opts-overwrite
swap_sd="1"
/home/user # cat /etc/default/mount-opts
# !!! Do not edit this file. It can be overwritten in next update !!!
# !!! Instead create and edit file /etc/default/mount-opts-overwrite !!!

# Options for mounting all filesystems
common_opts="noatime,nodiratime"

# Options for mounting root's filesystems (/, /home)
root_opts="errors=continue,commit=1,data=writeback"

# Options for mounting user's filesystems (MyDocs, SD cards, ...)
user_opts="noauto,nodev,exec,nosuid"

# Options for swap partitions
swap_opts=""

# Options for different filesystems
vfat_opts="utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir"
ntfs_opts="nls=utf8,uid=29999,umask=0000"

# Renerate fstab at boot time in /etc/event.d/rcS-late
genfstab="1"

# When generating fstab add also swap partitions from SD card (if exists)
swap_sd="0"

# Call fsck -p for /home at boot time in /etc/event.d/rcS-late
home_fsck="1"

# Call fsck -p for user's partitions (MyDocs, SD cards, ...)
user_fsck="1"

# Include overwrite file
if [ -f /etc/default/mount-opts-overwrite ]; then
. /etc/default/mount-opts-overwrite
fi
/home/user # cat /etc/fstab
# This file was generated by script /etc/event.d/rcS-late
# !!! Do not edit this file. It will be overwritten in next device startup !!!
# If you want static /etc/fstab add genfstab="0" to file /etc/default/mount-opts-overwrite
rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,bulk_read,no_chk_data_crc 0 0
/dev/mmcblk0p2 /home ext3 noatime,nodiratime,errors=continue,commit=1,data=writeback 0 2
/home/opt /opt none bind 0 0
/dev/mmcblk0p1 /home/user/MyDocs vfat noatime,nodiratime,noauto,nodev,exec,nosuid,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0000,rodir 0 2
/dev/mmcblk1p2 none swap sw 0 0
/dev/mmcblk1p3 none swap sw 0 0
/dev/mmcblk0p3 none swap sw 0 0
/home/user #

Last edited by taxaza; 2013-12-30 at 02:03.
 
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#193
Originally Posted by taxaza View Post
I am experiencing the same result with fw190 although flopswap correctly sets swap_sd="1".
I used to have flopswap install with 1.2GB swaps. A few days ago I decided to flash my n900 because of reboots I couldn't solve. I made swaps of 1GB this time. That's the only difference I can think of. Can you please help me get flopswap running normally again?
Thanks for the detailed output.
I can clearly see the issue is due to your internal swap having a UUID which it shouldn't. I have only just realised I explained this via PM (with fw190) and not here.

-------------------------------------------------------------

Originally Posted by sixwheeledbeast
Thank you it's seems I have found why FlopSwap is not working for you.

I have never seen anybody's internal swap have a UUID. This is not normal, also it appears the UUID is the same as one of your uSD partitions.

Due to this FlopSwap does not understand which is your internal swap. Internal swap shouldn't have a UUID. I am not quite sure how this has managed to happen on your system.
Originally Posted by fw190
I have a special partition for Easy Debian on emmc - that was the whole starting point - easy debian on special aprtition and swap on sd so it all works as fast as possible.
Originally Posted by sixwheeledbeast
Well I am not sure of the best way to solve that.
FlopSwap needs to know which is uSD and which is internal somehow.

This is the same way that system-services (rcS-late) works out internal and external swaps. IIRC you where having trouble with that?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#194
Thanks for your reply!
My guess is that resizing partitions of N900 with my UBUNTU PC gave the internal swap UUID.
Any idea how can I clear the UUID?
I tried without success;
Code:
/home/user # tune2fs /dev/mmcblk0p3 -U clear
tune2fs 1.42.5 (29-Jul-2012)
tune2fs: Bad magic number in super-block while trying to open /dev/mmcblk0p3
Couldn't find valid filesystem superblock.
/home/user #

Last edited by taxaza; 2013-12-30 at 21:18.
 
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#195
What I tried so far with no luck was to delete swap and recreate it. If I do it from my PC, UBUNTU (gparted or mkswap) always adds a UUID. In fact all cases I looked online were about people complaining about a bug that created partitions without UUID and they were looking for a way to fix it. I tried to cause this "bug" (2010) but it seems is well fixed now.
I also tried to create the swap through backupmenu's root console in case the bug was still there for N900 but I couldn't (empty partition then creating a swap with mkswap, still getting UUID).

Based on my experience, to give your swap a UUID unintentionally happens easily. If you move (like my case) or enlarge the internal swap, especially using gparted, it gets a UUID.

Also, as a result of my tests N900 now only uses internal swap (768MiB) and completely ignores SD's swaps (also flopswap only sees the internal swap). I really don't know how I managed to do this.

Maybe I am missing something since I am not a linux expert, so I would appreciate any help.

Last edited by taxaza; 2013-12-31 at 09:43.
 

The Following User Says Thank You to taxaza For This Useful Post:
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#196
Originally Posted by taxaza View Post
Maybe I am missing something since I am not a linux expert, so I would appreciate any help.
With you being only the second person to have this issue and me not expecting to see it again, I have not looked into a solution.

It seems there is a bug in Maemo mkswap which causes them not to have UUID's. Maybe this can be used to your advantage. Never tested this but can you boot, swapon/swapoff manually to a uSD swap and then umount and mkswap. Failing that what about reflashing your rootfs only.

If you still have no luck I will look into a solution ASAP.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#197
Thanks again for your help!
I tried the swapon/swapoff solution you proposed. Unfortunately mkswap is fixed now and always add UUID. The closer I got was to create an ext3 replacing the swap. Then I cleared the UUID of the ext3. There is no way though to convert this into swap keeping the empty UUID.
I thought of a solution but it requires changes to flopswap. As you know the internal swap doesn't have a label while swaps at SD are labeled sdswap1 and sdswap2. If I changed the label of internal swap to e.g. "swap" flopswap could also check for internal swap using this preagreed label.
 
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#198
Originally Posted by taxaza View Post
Thanks again for your help!
I tried the swapon/swapoff solution you proposed. Unfortunately mkswap is fixed now and always add UUID. The closer I got was to create an ext3 replacing the swap.
http://linux.die.net/man/8/mkswap
Does using the -U flag and leaving it blank work?

Originally Posted by taxaza View Post
If I changed the label of internal swap to e.g. "swap" flopswap could also check for internal swap using this preagreed label.
I am trying to reproduce how the partition gets a UUID first but this could be an option.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 32 | Thanked: 12 times | Joined on Jan 2010
#199
Yes, I tried it. The maemo version of mkswap accepts only the -L parameter and it gives an error about unknown parameter.
I also tried this -U from desktop (with mkswap and other tools too) but the "" always return an error message that UUID given is not correct (based on the UUID standards).
The only command that I found that clears UUID is tune2fs (works for ext3/ext4). Unfortunately the "-U clear" that works for other kind of partitions is not accepted by tune2fs for swap partitions.

Originally Posted by sixwheeledbeast View Post
I am trying to reproduce how the partition gets a UUID first but this could be an option.
If I understand correctly the UUID given by the system is created randomly (respecting the UUID specifications of course). You can very easily set any UUID you want with tune2fs. Since the chances of having the same UUID in a system are astronomical we can even use a preagreed UUID.
If I understand correctly you want flopswap to locate the swap on the internal memory automatically. I am in no way an expert to give you advices but can't the swap be located by:
Code:
blkid | grep swap | grep mmcblk0
I guess flopswap needs to load way before you can use something like this.

Thanks again for your efforts!

Last edited by taxaza; 2014-01-03 at 21:15.
 
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#200
Originally Posted by taxaza View Post
If I understand correctly you want flopswap to locate the swap on the internal memory automatically. I am in no way an expert to give you advices but can't the swap be located by:
Code:
blkid | grep swap | grep mmcblk0
Thanks again for your efforts!
grep mmcblk0 does not guarantee you will locate internal swap.
The order of mmc devices in Maemo is random, any name is later configured by udev. The kernel will assign first available number for first device which ask for it.
KP has patch which allocate mmc0 only for internal so when SD card is initializing it will always get mmcblk1*
After speaking with Pali this is why I moved Flopswap away from defined values in (0.1.0) it should be flexible enough to work out where the swaps are no matter where they are mounted at boottime exactly like all the upstart scripts do.

I just messed up my device partitions testing and reflashed rootfs only. This replaced my internal swap to stock with no UUID. I had done a backupmenu backup to restore to before hand.

I still don't understand how it got a UUID in the first place.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:55.