413 Commits
Author SHA1 Message Date
Antynea 9b73e0ac62 Check uuid requirement. (#52)
* detect uuid requirement

add new function to detect uuid requirement

* Reduce generation time

New function doesn't need to be called at each generation of a menu entry
3.2
2018-06-11 15:52:00 +02:00
Maxim Baz b17e7bd6a1 Add a dedicated config file (#49) 3.1.1 2018-04-20 18:08:37 +02:00
Antynea b8325cf134 Fix: some functions doesn't work as expected (#48)
* Fix: Title format in grub-menu

function: 
- title_format , doesn't work as expected

replace print message with default parameter (p/d/n)

* Update header

- Add Github link
- Clear up some explanations

* Fix: path to grub-mkconfig_lib

. "$pkgdatadir/grub-mkconfig_lib" doesn't work on some distribution
Replaced by . "$datarootdir/grub/grub-mkconfig_lib"

* Fix: matches kernel & initramfs

matches kernel & initramfs doesn't work as expected
3.1
2018-04-19 15:45:59 +02:00
Antynea c5da4014ae Update readme to v3.xx
Update readme to v3.xx

GRUB_BTRFS_CREATE_ONLY_HARMONIZED_ENTRIES="true" 
Doesn't exist anymore

GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker" "nosnapshot")
Delete "nosnapshot" it is confusing

New option available :
GRUB_BTRFS_DISABLE="true"
(Disable grub-btrfs)
3.0.1
2018-04-17 12:18:56 +02:00
Antynea 8508cac7d8 GRUB shouldn't break anymore (#46)
* Update 41_snapshots-btrfs

Enhanced error handling :
	- new function available: print_error
	- if btrfs-progs is not present, print a error and exit

New options in etc/default/grub 
	- disable this script
		
Enhanced menuentries:
	- menuentries is now store in new grub configfile (/boot/grub/grub.cfg)
	- use new functions for make a menuentry: make_menu_entries and entry
	- harmonize menuentry with matching version kernel&initramfs # initramfs-linux-fallback is include and not boot with intel-ucode if exist , same as original patch in GRUB for Arch Linux
	- make a menuentry in Grub menu (grub.cfg) to load our configfile

Enhanced /boot detection:
	- create two separate function for make menuentries, if /boot is on a separate partition, use function boot_separate, else, boot_bounded
	- if no kernel found, print a message and exit
	- if no initramfs found, print a message and exit

Delete function: boot_dir
No longer uses gettext_printf function of grub-mkconfig_lib

New function to detect kernel:
	- add all original standard kernel
	- verifying if kernel exist before to continue

New functionto  detect initramfs:
	- add all original standard initramfs
	- verifying if initramfs exist before to continue
	
New function to detect microcode

New counter:
	- add a counter to show a warning if the total menuentries made exceeds 250 entries

Purge some obsolete code

Size tabulation is now 4
3.0
2018-04-16 21:43:47 +02:00
Maxim Baz a5a96fad08 Set default value of GRUB_BTRFS_CREATE_ONLY_HARMONIZED_ENTRIES to true 2018-04-06 16:28:36 +02:00
Maxim Baz 66a06be198 Set default value of GRUB_BTRFS_LIMIT to 50 2018-04-06 16:28:36 +02:00
Maxim Baz c44eda0913 Skip ignored snapshots during generating entries, not after 2018-04-06 16:28:36 +02:00
Maxim Baz f0b5d194c7 Add note about GRUB_BTRFS_SNAPPER_CONFIG to README 2018-04-01 21:50:13 +02:00
Maxim Baz 773a8bfb76 Support selecting snapper's config, default to 'root' (#41) 2.2 2018-04-01 21:38:22 +02:00
Antynea 1b40cfee20 Update 41_snapshots-btrfs
Update 41_snapshots-btrfs
2.1
2018-02-03 22:59:03 +01:00
Antynea 358dedc392 Update 41_snapshots-btrfs
Update 41_snapshots-btrfs
2018-02-03 22:57:04 +01:00
Antynea 55dc182b34 Update README.md 2018-02-03 22:31:43 +01:00
Nathan Parsons 23ddb063cb Add systemd service configuration for grub updating (#38)
* Add systemd service configuration for grub updating

This configuration file causes `update-grub` to be run after
Snapper's cleanup and timeline services are run by systemd

* Make invoked command more universal

* Note the need to run systemctl daemon-reload
2018-02-03 21:50:40 +01:00
Antynea ca51d74265 Update README.md 2018-01-26 11:00:55 +01:00
Antynea f8937a3fc7 Update README.md 2018-01-26 10:58:04 +01:00
Antynea 9265eb96de Update README.md 2018-01-26 10:55:45 +01:00
Antynea 72edee3d1c Update README.md 2018-01-26 10:54:37 +01:00
Antynea d24ba197a8 Update README.md 2018-01-26 10:53:42 +01:00
Antynea 0e826391f1 Update 41_snapshots-btrfs 2018-01-26 09:19:33 +01:00
Antynea 7166d939fa Update README.md 2018-01-26 09:18:13 +01:00
Antynea 5cfbf46c8c fix Snapper id too long #36
* fix Snapper id too long #36
v2.0.1
2018-01-07 00:31:16 +01:00
Antynea 12cb591307 Update README.md 2018-01-04 10:06:41 +01:00
Maxim Baz 49c64425eb Use snapper's snapshot description if available, fixes #34 (#35)
* Use snapper's snapshot description if available, fixes #34

* List snapper's snapshot from all configs

* fix: Title format in grub-menu, that didn't work as expected
v2.0
2018-01-03 21:15:26 +01:00
Antynea cb4040cd24 fix issue #27
and add "Display name of microcode in menuentry when available"
v1.11
2016-11-25 01:09:34 +01:00
Antynea 55d5a4c5c2 Merge pull request #26 from daftaupe/patch-1
Update the top-level subvolid from 0 to 5.
2016-11-18 14:40:19 +01:00
Pierre-Alain TORET bfa42253e0 Fix typo 2016-11-18 14:23:23 +01:00
Pierre-Alain TORET 13f263ca0c Update the top-level subvolid from 0 to 5.
According to https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes, the toplevel subvolume is 5 not 0, so I guess that's what should be used here.
Also fixed a few typos.
2016-11-18 12:10:59 +01:00
Antynea 18e36190f4 Update README.md 2016-05-04 16:19:45 +02:00
Antynea f4c02dac09 add "Create entries with matching version number instead of all possible combinations of kernel and initramfs"
* GRUB_BTRFS_CREATE_ONLY_HARMONIZED_ENTRIES="false" 
-----> (Create entries with matching version number instead of all possible combinations of kernel and initramfs)
2016-05-04 13:46:31 +02:00
Antynea 86c8d0a0e8 Merge pull request #22 from anyc/master
Create only entries with matching version numbers and one small improvement
v1.10
2016-05-03 16:26:15 +02:00
anyc 9fcdab5277 create only entries where kernel and initramfs have the same version number 2016-05-03 16:15:20 +02:00
anyc 87932d900d use safe temporary directory 2016-05-03 11:19:33 +02:00
Antynea f0c50d1d76 Fix : GRUB_BTRFS_LIMIT (Limit the number of snapshots populated in the GRUB menu.)
Fix : When a value =< 0, script stop correctly
fix : When a value => 1, script stop when the value is reached

e.g :
 - GRUB_BTRFS_LIMIT="0"
   script doesn't detect snapshot

 - GRUB_BTRFS_LIMIT"1" or "2" "etc..."
   script will stop the snapshot detection when value is reached
v1.9.1
2016-04-22 15:29:38 +02:00
Antynea 87a94c19c2 Merge pull request #21 from Psykar/patch-1
Readme typos and grammar
2016-04-19 02:49:01 +02:00
Louis des Landes c8a7214e22 Readme typos and grammar 2016-04-19 10:46:09 +10:00
Antynea befb66e801 Update README.md 2016-04-19 02:30:07 +02:00
Antynea 7213d04a42 Update README.md 2016-04-19 02:29:09 +02:00
Antynea 5ea4c86400 Enhanced
add a option to : specific path to ignore during run grub-mkconfig
e.g :
# Found Snapshot: 2016-03-31 10:26:52 var/lib/docker/btrfs/subvolumes/74040aee4fa

docker is not a real snapshot available to boot
add : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker") to your /etc/default/grub
and this path will be skip during run grub-mkconfig

Warning : copy exactly the right path (var/lib/docker , not /var/lib/docker/), do not put the full path
2016-04-19 02:28:19 +02:00
Antynea f17ce68fb3 Merge pull request #19 from Antynea/v1.xx
Enhanced
v1.9
2016-04-19 02:23:33 +02:00
Antynea 7720cec5f9 Enhanced
- clean code
- add a option to : specific path to ignore during run grub-mkconfig
e.g :
# Found Snapshot: 2016-03-31 10:26:52 var/lib/docker/btrfs/subvolumes/74040aee4fa

docker is not a real snapshot available to boot
add : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker") to your /etc/default/grub
and this path will be skip during run grub-mkconfig

Warning : copy exactly the right path (var/lib/docker , not /var/lib/docker/), do not put the full path
2016-04-19 02:18:24 +02:00
Antynea b4bd7b952c clean code v1.8.2 2016-04-18 17:58:57 +02:00
Antynea 56c11b8e2a - overhaul
- add two new custom variable to /etc/default/grub :
* GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND="true"
(Show Total of snapshots found during run "grub-mkconfig")

* GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="true"
(Show snapshots found during run "grub-mkconfig")
v1.8.1
2016-04-18 17:31:57 +02:00
Antynea d469db0a2d - fix bug issue #18 :
if no snap found, menu generate correctly, and show a warning
- overhaul
- add two new custom variable to /etc/default/grub :
* GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND="true"
(Show Total of snapshots found during run "grub-mkconfig")

* GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="true"
(Show snapshots found during run "grub-mkconfig")
2016-04-18 17:31:33 +02:00
Antynea 6ae56dbaf6 Merge pull request #16 from wesbarnett/master
Add GRUB_BTRFS_LIMIT 
add GRUB_BTRFS_SUBVOLUME_SORT
v1.8
2016-03-19 16:35:54 +01:00
James Barnett f820de4759 add sorting options 2016-03-19 08:19:10 -05:00
James Barnett 59164367e7 cleanup 2016-03-19 08:11:47 -05:00
James Barnett f256338074 Add GRUB_BTRFS_LIMIT
Allow user to limit the number of snapshots listed in GRUB. This also reverses
the order of the snapshots such that the more recent ones come first. That is,
if a user specifies GRUB_BTRFS_LIMIT=10, then only the 10 most recent snapshots
will be shown. The default limit is 100, which seems very large. The more
snapshots in the GRUB menu, the longer the system takes to boot.
2016-03-18 16:46:11 -05:00
Antynea 52ab9dbe95 Merge pull request #14 from Antynea/v1.xx
fix: incorrect detection "$boot_dir_real_path" for initramfs
1.7.2
2016-02-15 03:44:10 +01:00
Antynea 28e9524ca5 fix: incorrect detection "$boot_dir_real_path" for initramfs 2016-02-08 00:01:42 +01:00