# refracta.freeforums.org

place to talk about refracta

Skip to content

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!

## disk labels in the installer

Stuff that has not yet gone into the official build.
Post a reply
7 posts • Page 1 of 1

### disk labels in the installer

by fsmithred » Sat Nov 03, 2012 10:20 pm

Here's a test script for using disk labels in the installer. It's pretty limited, and all it does is echo your choices to screen, so it's safe to run it. https://gist.github.com/4009041
A list of partitions with disk labels is shown for reference only.
The checklist for the install partition is shown.
If you choose a partition that has a label, the label gets used in fstab, else the device name is used.
It does not let you create a label.
That was easy, and I can fit it right into the existing installer script. Making a checklist that shows the full device name and the label is less easy. Making different checklists for device names and labels, and you get one or the other might be possible, but I expect it will take a lot longer, given my current schedule. Tell me if something like this is sufficient, or tell me what else it needs to do.
I suppose it would not be too difficult to let you create a label when the partition gets formatted. Doing it in gparted won't work, because the script creates a new filesystem after gparted is finished.
Edit: Oh, duh! I'm going to have to re-label any pre-labeled partitions when they get formatted. Or maybe give an option not to format the partition. Will have to think about that one.
Last edited by fsmithred on Sun Nov 04, 2012 12:35 pm, edited 1 time in total.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: disk labels in the installer

by ukbrian » Sun Nov 04, 2012 9:43 am

Anthony Nordquist(SalineOS) added labels to his Yad Squeeze script so his Wheezy script might be helpful to you.
http://lin.me.uk/temp/saline-installer

ukbrian
  Posts: 109
  Joined: Mon Jul 25, 2011 8:22 am
  Location: Cheltenham, UK

Top

### Re: disk labels in the installer

by fsmithred » Sun Nov 04, 2012 12:35 pm

Yes, I've seen Anthony's script, and I borrowed a line of code from it already. Tell me what functionality you need -
do you need to see existing labels?
is it enough to see a separate list of them and still choose a partition from a list of device names?
do you just want to be able to give the partition a label during the installation, and use that label in fstab?
something else?
Thanks,
fsr

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: disk labels in the installer

by fsmithred » Sun Nov 04, 2012 4:37 pm

Here's an untested installer that lets you create disk labels. (Sorry, not a lot of time right now, or I would have tested it before posting.) - https://gist.github.com/4012515
rename it to refractainstaller-gui. You'll need to have 9.0.5-3 installed for all the extra files.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: disk labels in the installer

by fsmithred » Mon Nov 05, 2012 3:16 am

Just ran the installer and did a successful install on a single partition with a disk label. There might be a syntax error in or around the options menu - my syntax highlighting was wrong for all the code after that point (around line 235), I made a change, then changed it back, and the highlighting was right. Might be a geany problem.
TODO:
-Add label support to the yad version of the script.
-Remove the need for running from a terminal in the zenity version. (Already did that in the yad version.)
-Edit the .desktop file to point to a wrapper script that decides whether to use yad or zenity.
-Clean up old code from the scripts.
And maybe
- remove the configuration function, and rely only on the config file.
- add a command-line option to use a different config file, and maybe one for a different excludes file. (Those are for me.)

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: disk labels in the installer

by fsmithred » Mon Nov 12, 2012 3:58 pm

Refracta Installer 9.0.6 uploaded to github repo (also in ibiblio testing repo, but I got error messages when I uploaded it.)
Yad and Zenity versions are both included, yad is used if it's present.
Disk labels supported in both gui versions (but not in cli version).
Gui installer no longer needs to be opened in terminal, but this adds xterm to the deps.
Other miscellaneous changes.

fsmithred
  Posts: 2101
  Joined: Wed Mar 09, 2011 9:13 pm

Top

### Re: disk labels in the installer

by dzz » Wed Nov 14, 2012 12:46 am

Finally got around to test installer 6.0.2 on a new snapshot of my (still reasonably clean) sid install; newly dist-upgraded, originally siduction but now essentially straight sid, including kernel and live-* from Debian. Yad is now installed, that was detected and used automatically
Chose to not install bootloader and use disk labels. Single partition.
Mountpoints have already changed in sid, probably soon in wheezy ("freeze" exception) so this must now be added to excludes :

Code: Select all
  `lib/live/mount`

<slash-etc/fsab.d> is already in excludes but should probably be <slash-etc/fsab.d/*>
Having manually edited that the install went well and everything seems to work. Log:

Code: Select all
  `Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
  Usage: grep [OPTION]... PATTERN [FILE]...
  Try 'grep --help' for more information.
  Usage: grep [OPTION]... PATTERN [FILE]...
  Try 'grep --help' for more information.
  df: write error: Broken pipe
  mke2fs 1.42.5 (29-Jul-2012)
  (yad:7510): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
  262144+0 records in
  262144+0 records out
  268435456 bytes (268 MB) copied, 5.78486 s, 46.4 MB/s
  Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
  sed: can't read /target/home/user/.gconf/apps/gksu/%gconf.xml: No such file or directory
  Usage: grep [OPTION]... PATTERN [FILE]...
  Try 'grep --help' for more information.
  df: write error: Broken pipe
  Usage: grep [OPTION]... PATTERN [FILE]...
  Try 'grep --help' for more information.
  df: write error: Broken pipe`

EDIT some of the errors above probably because the live-user in the snap is other than "user"
Observations on disk labels:
For me the main reason for disk labels is that the actual partitions have humanly-identifiable labels, whether or not labels are used in fstab. Normally, here, UUID (with comments) is used in fstab but all partitions get labelled, e.g. "refracta" "sid-snap" "tera-data"
My idea for refracta-installer (advanced options menu) was simply a text box where you could set a custom partition label. I didn't know the plan was to do fstab as well.
But it's not possible to suit every individual needs case. Ultimately those of us who have reasons to configure things differently still can even if a little extra manual work is required. There is only a real problem when choices are actually removed and replaced with enforced defaults. (e.g. grub-pc to mbr without asking)
Anyway. good work, I know it is time-consuming tracking sid/testing, soon as you get something sorted it's already changed!
EDIT As I used labels, could not test the quotes around fstab uuid which caused errors were sorted properly... (minor point) "The root password can now be changed" window has no title so "YAD" gets used.

dzz
  Posts: 647
  Joined: Wed Apr 27, 2011 11:53 am
  Location: Devon, England

Top

Display posts from previous:
Sort by

Post a reply
7 posts • Page 1 of 1

Return to Experimental

Jump to:

### Who is online

Users browsing this forum: No registered users and 0 guests

Donate Now
ProNight Style by ModphpBB3
Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
A Member of the Crowdgather Forum Community
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
Report Violation
suspicion-preferred