Refracta Development, Scripts, etc.
Post a reply
fsmithred

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

## Installer option: "Do not format"

Fri Oct 18, 2013 10:13 am

Can it be one setting to format or not format all partitions being used, or must there be separate options for /boot, / and /home? I'm leaning toward a single option, on the grounds that it's easier for me, but also I'm thinking that anyone who doesn't want the installer to format the partitions will be doing it manually in gparted, so they can do them all while they're at it.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Installer option: "Do not format"

Sat Oct 19, 2013 5:57 pm

I never did it at all, but wouldn't the only thing which makes sense to not format /home ?
(I am fine this way or that way and am always for the more easy solution ... )
Ah, oh. I think i remember now. I open gparted and create partitions including a filesystem.
The installer goes on after i close gparted and creates the filesystem[s] again.
That?
Well: i simply ignored it (aka: it doesn't bug me).
(So my answer stays like above: this way or that way is fine. easy is good).
fsmithred

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

## Re: Installer option: "Do not format"

Sun Oct 20, 2013 11:00 am

It might make sense to have an option to use an existing /home partition, but I haven't thought about how to do that. The reason for including all paritions in the no-format option would be for anyone who uses gparted to make the partitions and gives them labels, so the labels don't get wiped out by mke2fs.
ukbrian

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

## Re: Installer option: "Do not format"

Sun Oct 20, 2013 5:05 pm

> fsmithred wrote:It might make sense to have an option to use an existing /home partition, but I haven't thought about how to do that.

I always put home in / but I always have a data partition with a label of "data" on all my machines so I exclude /home/user/data/* and add a line to the new fstab in refractainstaller-yad at line 1045 approx

Code:
  `echo "LABEL=data /home/user/data ntfs-3g defaults,uid=1000 0 0"
  `

and ending the line as the previous line with >> etc
If I try to put the whole line in code tags I get a 403 error.

> The reason for including all partitions in the no-format option would be for anyone who uses gparted to make the partitions and gives them labels, so the labels don't get wiped out by mke2fs.

That's me
I've been overcoming this by commenting out the format line.
I asked Anthony Nordquist to add labels to his remastersys based installer twice, the second time the answer was "This is never going to happen" but a few months later he brought out grub-doctor and I posted a pic of his grub-doctor partition selection screen which just had sdb? in one column and the operating system in a second column alongside a gparted screen and he very quickly put out an amended grub-doctor with the present screens.
Not only that he also put the same code into his clone partition, salineos-backup and remastersys-installer.
I believe he used an array and you might be able to lift his code from grub-doctor for refracta-installer.
I would suggest you use a % GB or MB if less than 1 GB in the first size column and display GB's used in the last column rather than MB's
Another suggestion is that you create a clone partition script as I find I'm using Anthony's more often than snapshoting and meandean said his script would do cloning.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: Installer option: "Do not format"

Sun Oct 20, 2013 10:28 pm

> fsmithred wrote:It might make sense to have an option to use an existing /home partition, but I haven't thought about how to do that. The reason for including all paritions in the no-format option would be for anyone who uses gparted to make the partitions and gives them labels, so the labels don't get wiped out by mke2fs.

Aha, so my second thought hit the nail.
I think your reasoning is right: if someone opens gparted anyway, then it makes sense he will create all partitions once it is open (I know that that is what i would do).
That was probably clear from what i wrote above already.
fsmithred

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

## Re: Installer option: "Do not format"

Mon Oct 21, 2013 10:42 am

Lots of changes happening in the installer. I managed to work the no_format option into the yad script, but I haven't tested it yet, other than to see that it does start, and I can get to the expert options window. Had to edit a lot of lines for that, and I hope I didn't screw it up. I may post a beta later today.
@Brian - I'm inclined not to focus on using refractasnapshot as a backup tool, since there are already so many of them around. It can be used to backup the system, but I don't think it's the right tool for backing up large amounts of data.
I like the grub-doctor partition display, and I'll have to play with that when I get time. For now, you get an xterm with the blkid output for reference in the installer, and df output in refractasnapshot. Maybe the installer needs the df output too? What partitions are you cloning and why? If you want to look at some sample backup scripts, here's a link to the first bash project that Nadir and I worked on. The tarball contains a readme that explains what each script does.
https://github.com/fsmithred/Backup-scripts
ukbrian

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

## Re: Installer option: "Do not format"

Mon Oct 21, 2013 2:47 pm

> I like the grub-doctor partition display, and I'll have to play with that when I get time.

Thank you, I think it helps folk who come over from windows and have no experience of using partitions.

> What partitions are you cloning and why?

I'm crap at describing stuff that's why I use videos and screen shots but I think Anthony developed the clone partition tool to use while he was developing his base for SalineOS.
If I install a fresh OS I normally remove the apps I don't want, update the system and then clone it to another partition which creates another entry in the grub menu but it doesn't make the clone the primary grub option, it adds the new entry to the bottom of the grub menu.
I then add all the apps I want and add all my symlinks so it's a full working system and then clone it again.
I might try other apps then and if I mess up or want to start again I just boot into the clone and clone it back to the original partition, it's very simple and quick.
If you fancy having a quick look download this file, unpack it and copy the files into the relevant directories.
He's written a really nice routine for adding excludes using a file manager to pick the folders but it lacks your wild cards. http://lin.me.uk/refracta/Backup.tar.gz
Finally I suggest you have a look at the Whisker menu at http://gottcode.org/xfce4-whiskermenu-plugin/
It's a very young project but looks to be on the right track, very easy to add remove favourites and you just drag/drop to reorder them.
fsmithred

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

## Re: Installer option: "Do not format"

Mon Oct 21, 2013 6:08 pm

New version of installer is up in the Testing folder at ibiblio.
http://distro.ibiblio.org/refracta/files/Testing/
If you're interested, there's a text file showing the diffs between 9.0.8-3 and 9.0.9(beta1).
I tested the yad version of the installer a few times and squashed a few bugs, but it needs more testing. Please hammer on it so I can see where it breaks..
My tests:
- separate home, / and boot, made labels in gparted, told it to use labels in fstab. It worked.
- separate home, / and boot (made new partitions) and let the installer format the filesystem, told it to use labels. It didn't ask me to supply the labels, but it used the existing labels which survived re-partitioning. If you want to get rid of labels, I guess you have to re-write the partition table. (I did that after, and it worked.)
- separate home, / and boot, let the installer format and ask me for labels. It worked as expected.
- single partition, use UUID in fstab. It worked.
NOTE: Only the yad script has the new code for disk labels. I'll work it into the zenity script later. Wanted to make sure I was doing it right first. Other changes listed below are in both scripts.

Code:
  `refractainstaller-base (9.0.9beta1) unstable; urgency=low
  * Drop "--root-directory=/target" from grub-install for jessie/sid.
  * Changed wording to edit etc/sudoers. (Not always "last line")
  * Added debug mode.
  * Removed $enable_updatedb to match refractasnapshot gui/base 9.0.9-5
  -- fsmithred <[email protected]
  > Mon, 21 Oct 2013 09:12:00 -0400
  refractainstaller-gui (9.0.9beta1) unstable; urgency=low
  * Test for Yad version in wrapper and in main script.
  * Drop "--root-directory=/target" from grub-install for jessie/sid.
  * Changed wording to edit etc/sudoers. (Not always "last line")
  * Zenity version now allows installing GRUB to a partition.
  * (Note: CLI version does not install GRUB to partition.)
  * Added debug mode.
  * Removed $enable_updatedb to match refractasnapshot gui/base 9.0.9-5
  * Added/changed exits, mostly in zenity version.
  * Existing disk labels get used if $use_labels = yes.
  -- fsmithred <[email protected]
  > Mon, 21 Oct 2013 09:12:00 -0400`

thwak

- thwak
- Posts: 174
- Joined: Tue Nov 20, 2012 3:58 am

## Re: Installer option: "Do not format"

Mon Oct 21, 2013 8:23 pm

Hi brian. You & I (aka "ava") have chatted over at the saline forum, and mint forum and...
The salineOS scripts are available at github.
https://github.com/SalineOS/SalineOS/bl ... eos-backup
Anthony's backup script uses code inherited from remastersys.
Scroll to line149 in the script ~~ see how it enumerates (accommodates) only 50 excluded item entries.
This limitation is not ideal, nor is it necessary. 50 seems like a lot, but my granular excludes list is indeed much longer than that.
In your installed salineOS, was a default "etc/salineos-backup/excludes" present?
Afaik, no such defaults file is provided...
...and I strongly disagree with some of the "hardcoded" saline-backup exclude items. For instance, scroll to line1824
Do you realize the consequence of excluding "gvfs-metadata" file from the backup?!?
FYI, "refractasnapshot" is analagous to "saline-backup"
but its package DOES install a default/suggested list of exclude items
(and its docs invite the user to add entries or outcomment default entries)
and it does not impose a limit on the number of entries.
Both scripts contain hardcoded "privacy-related" exclusions, suitable for (relevant to) the task of
_remastering_ but less than ideal for the task off creating a faithful personal "backup copy" of one's system.
Bottom line: Of the 2 scripts, currently refractasnapshot is more evolved, more flexible, than saline-backup.
fsmithred

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

## Re: Installer option: "Do not format"

Tue Oct 22, 2013 12:21 pm

Thanks for the endorsement, Thwak. Making the scripts flexible is one of my main goals. I can't predict the exact circumstances of every user, so I want the user to be able to customize the script for their own needs.
To clone a partition, I'd just use rsync. If the partition I'm cloning contains a running system, I'd use a simple excludes file like the one that refractainstaller creates if you don't have a separate excludes file. (Look inside the script to see this.) If it's a data partition, it doesn't matter if the system is running. The other way to do it is to boot a live CD or USB and clone the partition. In that case, it may not be necessary to exclude anything. And it's easy to update a clone with rsync, since it only copies files that have changed since the last run.
Brian, you may want to look at the get-selections/set-selections scripts. They run some commands that record the package states in the system and reset them to a previous state. I've used them in the past to do just what you describe - install a bunch of packages, decide I don't want them, and then go back to the way it was without having to deal with dependencies that got pulled in, and without needing the hard drive space to hold a copy of the partition. If you do try them, take a look at this line in set-selections.sh -
apt-get --no-install-recommends -u dselect-upgrade
and either keep or remove the --no-install-recommends option according to how you normally install things.
You can find them here - https://github.com/fsmithred/refracta
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.