Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Installer option: "Do not format"

Refracta Development, Scripts, etc.

Re: Installer option: "Do not format"

Postby ukbrian » Tue Oct 22, 2013 6:44 pm

Thank you both for taking the time and effort to reply.

@thwak
Bottom line: Of the 2 scripts, currently refractasnapshot is more evolved, more flexible, than saline-backup.
I decided 2.5 years ago that refracta was for me as I was doubtful about the future of remastersys so although I have been using SalineOS as my workhorse I have been using refracta to create installable ISO's.

One of the last suggestions I made before Anthony went off line was to use wild cards in his excludes and he replied that he would have to thoroughly test them first before including them.

I'm not a technical guy but I understand the importance of what you are saying about salines excludes and suggest it would be worth posting them on the saline forums.

@fsmithred
To clone a partition, I'd just use rsync.
We'll drop this as you already have your own way of doing things and I understand what you say about "without needing the hard drive space to hold a copy of the partition." as that was my thoughts first of all but now I find I'm using clone partitions.

I think I'm the only one who has mentioned partition labels and I hope I have not misled or wasted your time.
I always use labels to identify my partitions in gparted but I don't use labels in fstab for OS partitions, I only use a label in fstab for my data partition as I have a data partition on all my machines with a label of "data" it makes it easier to install snapshots from one machine to another using the same line in fstab.
Code: Select all
LABEL=data   /home/user/data   ntfs-3g  defaults,uid=1000   0      0

I'm deeply sorry if I have wasted any of your valuable time.

I've downloaded the beta script but when I've selected "use existing swap partition" and "Use UUID in fstab" I'm not getting the partition labels kept when I install, is it only with "Use labels in fstab" option that have the new label routines?

Tomorrow I'm going to install Refracta and try to put a working system together.
User avatar
ukbrian
 
Posts: 109
Joined: Mon Jul 25, 2011 8:22 am
Location: Cheltenham, UK

Re: Installer option: "Do not format"

Postby fsmithred » Tue Oct 22, 2013 6:59 pm

No, you're not the only one who wanted support for disk labels - dzz has more than 10 partitions on his computer, and he uses labels. Since adding a couple more hard drives to my computer, I'm using labels, too, even if I don't use them in fstab, I still have them just to help me remember what data is on which partition.

In the installer, you can select to use uuid or labels in fstab, but you can't select both. If you try, you'll get an error message. I'm not clear on what you mean about losing your labels. Are you saying the installer wiped out the label on a partition you were using for the installation?

If you select to use labels in fstab, the script will behave differently, depending on whether the partition you're using is already labeled or not. If the label exists before you run the installer, that label will get used. If there's no label on the partition, you'll be asked to supply one, and if you leave the text-entry box blank and proceed, you'll end up with the device name in fstab.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Installer option: "Do not format"

Postby golinux » Tue Oct 22, 2013 7:18 pm

Been following this though most of it is over my head. FWIW, I also use disk labels and in fstab too. Last I tried, I prepared partitions with labels and they were wiped during installation. Easy enough to relabel but a bit of a pain. If I ever run out of Bermuda grass to pull out of my fallow garden, I might get back to testing the latest refracta tools.
May the FORK be with you!
User avatar
golinux
 
Posts: 663
Joined: Thu Nov 08, 2012 1:23 am

Re: Installer option: "Do not format"

Postby thwak » Tue Oct 22, 2013 8:56 pm

"do not format"
labels are especially important in this context, where user is installing and must decide...

Yeah, that install step is a scary proposition. I think it was brian who suggested (back during my LMDE usage) intentionally setting distinct/different partition sizes, in order to recognize them in the absence of labels being displayed. Thanks for that helpful suggestion, brian. It has served me well.
thwak
 
Posts: 174
Joined: Tue Nov 20, 2012 3:58 am

Re: Installer option: "Do not format"

Postby fsmithred » Wed Oct 23, 2013 12:48 am

golinux wrote: Last I tried, I prepared partitions with labels and they were wiped during installation. Easy enough to relabel but a bit of a pain.


Yes, I remember that, and I was expecting it to happen on one of my test installs, but it didn't. I used gparted to prepare the partitions, create the filesystems and label them, and I let the installer run normally, which includes making filesystems. The labels didn't get wiped. I'd like to know why. I'll do some more installs. If anyone else tries this, please take notes and let me know what happens. Thanks.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Installer option: "Do not format"

Postby ukbrian » Wed Oct 23, 2013 1:51 am

@thwack
Yeah, that install step is a scary proposition. I think it was brian who suggested (back during my LMDE usage) intentionally setting distinct/different partition sizes, in order to recognize them in the absence of labels being displayed. Thanks for that helpful suggestion, brian. It has served me well.
Not guilty your honour, I've always used 20 GB partitions.

@golinux
Been following this though most of it is over my head.
You done a great job on the web site friend.

I've had a nightmare day trying to make sense of what's been happening with labels.

I started by making a snapshot of saline on sdb7 and then installed it at sdb13 after formatting the partition and gave it a label of beta, I booted up and run gparted and the label was there.
I then decided to do another install to an existing partition on sdb11 without formatting or changing the label, booted into it and the existing label was there but the label "beta" had disappeared on sdb13.
So I installed to sdb13 again to make sure I had done the label but when I rebooted the label was back on sdb13 but the label on sdb11 was missing.

If I booted into sdb7 I got one set of labels in gparted, if I then booted into sdb11 I got another set of labels and got another set when I booted into sdb13. If I booted a live CD sdb11 and sdb13 had no labels.

Then the good news, I installed the refracta ISO in case it was saline playing games with me.
I installed pulseaudio and I love Refracta, everything so far works perfectly.

So I installed the beta script and took a snapshot and done some installs but the same thing was happening.

I booted into windows to run a windows partition manager but it didn't use labels.

Then the penny dropped, use blkid to double check.
I took this img when I was running sdb11 and you can see in blkid the LABEL is at the end of the line unlike the other labels. Image

This img when running a live CD Image

I don't know if this will help but I think this is the bit of code in clone partition and I've used that many times.
Code: Select all
## Preserve labels set by users in GParted
if [ "$(ls /dev/disk/by-label)" != "" ]; then
LabelRoot=$(find /dev/disk/by-label/* -printf %f" "%l\\n | grep "$TargetPart" | awk '{print $1}' | sed -e 's|\\x20| |g')
fi
sleep 2
mke2fs -t ext4 /dev/$TargetPart

sleep 2

if [ "$LabelRoot" != "" ]; then
tune2fs -L "$LabelRoot" /dev/$TargetPart
fi


I'm off to bed now, play with Refracta tomorrow.
User avatar
ukbrian
 
Posts: 109
Joined: Mon Jul 25, 2011 8:22 am
Location: Cheltenham, UK

Re: Installer option: "Do not format"

Postby fsmithred » Wed Oct 23, 2013 3:02 pm

I think the labels did get wiped when I thought they didn't. Just tried it again. Booted an iso in vbox, created a label on first partition of a virtual hard drive, did a single-partition install without telling the installer to use labels and let the installer format the filesystem. When I was done, blkid (and I think gparted, too) showed the label was still there, but after rebooting, the label was gone. Maybe it just gets stuck in memory and looks like it's still there when it isn't.

Edit: It's stored in etc/blkid.tab. When you run blkid, it reads from that file unless you tell it not to.
Code: Select all
blkid -c /dev/null


-c cachefile
Read from cachefile instead of reading from the default cache file etc/blkid.tab. If you want to start
with a clean cache (i.e. don't report devices previously scanned but not necessarily available at this
time), specify /dev/null.


I'll change it in the script.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Installer option: "Do not format"

Postby ukbrian » Thu Oct 24, 2013 7:34 am

Maybe it just gets stuck in memory and looks like it's still there when it isn't.
That was my conclusion.

I'm loving the Refracta ISO :D
I've thrown everything I use at it and it comes back smiling and asking for more so it looks like being my new workhorse.

The sun is shining so I'm going out for the day but when I return I'm going to install Refracta and build my new system.

Well done you guys. :D
User avatar
ukbrian
 
Posts: 109
Joined: Mon Jul 25, 2011 8:22 am
Location: Cheltenham, UK

Re: Installer option: "Do not format"

Postby fsmithred » Thu Oct 24, 2013 9:51 am

Yikes! Just found a problem in the code. While changing blkid (see edit in my post above) I found an error that needs to be fixed. On line 1124 of refractainstaller-yad 9.0.9beta1, change "install_part" and "install_dev" to "home_part" and "home_dev".

To fix the phantom label problem, replace "blkid" with "blkid -c /dev/null" on lines 483, 1099, 1126, 1151.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Installer option: "Do not format"

Postby ukbrian » Thu Oct 24, 2013 1:15 pm

I'm not seeing any difference
During the install blkid showed the label correctly but after the install while still in the live CD if I blkid again it shows the label at the end of the line but all other partitions show the label at the start of the line.
If I reboot the CD and then do a blkid there is no label.

I have tried this with replacing "blkid" and "blkid -s" with "blkid -c /dev/null" on lines 1099, 1126, 1151
Code: Select all
rootfslabel=$(/sbin/blkid -c /dev/null -s LABEL
rootfslabel=$(/sbin/blkid -c /dev/null LABEL
User avatar
ukbrian
 
Posts: 109
Joined: Mon Jul 25, 2011 8:22 am
Location: Cheltenham, UK

PreviousNext

Return to Discuss

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred