Commit Graph

483 Commits (master)
 

Author SHA1 Message Date
Shinji Suzuki 2bb9b12403 Fix module name typo that gets triggered by overwriting installation of
distros that have some dirs relocated to the root dir.
6 years ago
Shinji Suzuki a6d3744134 Fix linux (ubuntu16.04) incompatibility.
* 7z don't understand -aoa option.
* subprocess.call() can't properly pass arguments to 7z if command is
specified by a list when shell=True.
6 years ago
Shinji Suzuki ef4d34b05d Convert 'gentoo' rewrite-code to ConfigTweaker based one.
Rename 'ParamTweaker' to 'ConfigTweaker'.

pentoo-amd64-hardened-2018.0_RC5.8_pre20180305 wants 'overlayfs' present
in boot params and 'aufs' absent in order to boot properly.
6 years ago
Shinji Suzuki 4ef4146180 Replace 'live-media=' on non-liveboot lines too. This is for compatibility
with prior implementation. (Perhaps better to have this work on liveboot
lines only like other rewritings?)

Move the test function for rewrite machinary into param_rewrite.py.

Add copyright header.
6 years ago
multibootusb 0345eab70a
Merge pull request #300 from shinji-s/check7zip_exec
Detect running 7zip on a currupted iso as well as the lack of 7z
6 years ago
Shinji Suzuki d75642ac62 Detect running 7zip on a currupted iso as well as the lack of 7z
executable.
Remove repeated call to _7zip.list_iso(iso_link)
Adjusted line breaking to fit within 80 columns.
6 years ago
Shinji Suzuki 7a18b71349 Introduce infrastructure for rewriting boot configs and refreshed
persistence support for debians.
  * Boot parameters have to be 'persistence' and 'persistence-path'
  rather than 'persistent' and 'persistent-path'.
  * Backing file must be named 'persistence' rather than 'live-rw'
  * Filesystem on the backing file must contain 'persistence.conf'.
Avoid rewriting of paths starting with '/cdrom/' or '/dev/'.
Try somedir/vmlinuz if somedir/vmlinuz.efi is unavailable.
Check availability of 'e2fsck' and 'resize2fs'.
Added data/tools/persistence.gz that has initialized ext3 file
system that contains 'persistence.conf' file.
6 years ago
multibootusb a02d207575
Merge pull request #297 from shinji-s/devel
Fix regression introduced by 8ea5932bdc.
6 years ago
multibootusb 2c43930c47
Merge pull request #296 from shinji-s/devel
When fixing a path to have /multibootusb/{distro-name} prepended, con…
6 years ago
Shinji Suzuki 03077403d2 Fix regression introduced by 8ea5932bdc.
With the change in the commit, loopback.cfg got regenerated at the
location of file determined by scanning iso tree. If no loopback.cfg was
found, it was assumed to be at the distribution root directory. In either
case, loopback.cfg was generated/overwritten at the determined location
and the file was chosen for booting.
Now, if no loopback.cfg is found, grub.cfg is sought. It is only in the
case where neither is found that loopback.cfg gets generated and used.
Therefore no config files provided by distro get overwritten.
6 years ago
Shinji Suzuki 170b8dcf58 When fixing a path to have /multibootusb/{distro-name} prepended, consider another prefix '/multibootusb/{distro-name}/boot too because some distro uses '/grub/grub.cfg' to refer to a file under boot/ directory. 6 years ago
multibootusb b52594d1cd
Merge pull request #294 from shinji-s/devel
Fix tweaking of 'initrd=...' line keyed on 'initrd' because 'initrd'
6 years ago
Shinji Suzuki fa960f1a07 Fix tweaking of 'initrd=...' parameter keyed on 'initrd' because 'initrd'
part in 'initrd.img' gets affected.
6 years ago
multibootusb c192e774e5
Merge pull request #293 from shinji-s/devel
More fixes on syslinux installation and loopback.cfg generation.
6 years ago
Shinji Suzuki fe597bf1de Fix a typo that has caused failure of installation if the distribution wants .iso file available when booting.
file when booting. My bad.
6 years ago
Shinji Suzuki a3ff878087 Remove a code that does not seem essential but can potentially hurts. 6 years ago
Shinji Suzuki 0669b962ed * Split the 'kernel ...' parameter not by ',/' but by ',' because some distro contains relative paths there and then we don't see './' there.
* Fix the last block of syslinux config file being picked up but being partially extracted (only to the end of the line rather than to the end of the block). => Took $ out of the regular expression and handles the last block separately.
* Don't use 'menu label' as a key to split a syslinux config file into blocks. Solely use 'label' as the separator for extracting menu items out of syslinux config file. If 'menu label' is also considered, then we may split halfway within a block. => Removed 'menu label' from the regular expression.
6 years ago
Shinji Suzuki a3542439f7 Previous commit fixed a runtime error but was not correct in what it does.
Avoid overwriting syslinux.cfg and extlinux.cfg.
6 years ago
multibootusb fab466aecd
Merge pull request #291 from shinji-s/devel
Fix failure of syslinux installation on the usb stick and enhance generation of loopback.cfg
6 years ago
Shinji Suzuki 8ea5932bdc Fixes/Enhancements on loopback.cfg generation.
* Be more consistent about location of 'loopback.cfg'. (Use the first
one found in the iso image.)
* Fixed failure to pick the last menu item defined in syslinux config file.
* Pick 'initrd=...' parameter in 'append ...' line and generate 'initrd
...' line.
* Keep the previous content when updating.updating
* Removed redundant open/close in write_to_file().
* Fixed error message in write_to_file()
* Reduced the number of open/close in iso2grub2().
* Avoid adding a menu item withe a given name more than once.
* Keep, within the generated file, record of the source files from which menu items were picked up.
6 years ago
Shinji Suzuki 9f28a1d756 Fix failure of "Install syslinux and copy all required files." 6 years ago
Shinji Suzuki d9290c543a Fix an excess level of indirection when processing more than one match
results.
6 years ago
multibootusb 4aef98a093
Merge pull request #290 from shinji-s/devel
Remove a temporary variable whose definition and the sole use are far…
6 years ago
Shinji Suzuki c290d0887b Remove a temporary variable whose definition and the sole use are far apart. 6 years ago
multibootusb 7d465e9b65
Merge pull request #289 from shinji-s/devel
Allow one pass execution of multi patterned file extraction.
6 years ago
Shinji Suzuki b8660450c8 Make use of copy_iso() function to reduce code redundancy.
Allow one pass execution of multi patterned file extraction.
6 years ago
Shinji Suzuki cb9f2da952 Remove redundant pre-check on iso_file_list. 6 years ago
multibootusb ae63318b15
Merge pull request #287 from shinji-s/devel
Replace a common code-block with a method call, which also fixes a bug
6 years ago
Shinji Suzuki 526cd6d7fb Replace a common code-block with a method call, which also fixes a bug
regarding 'Avira-RS' installation. That is, shutil.move(,f) is conditioned on
os.path.exists(f).
6 years ago
multibootusb 3b041ae2fb
Merge pull request #286 from shinji-s/devel
Fix issue of 'menu label' or 'label' matching in the middle of line.
6 years ago
Shinji Suzuki 088a285375 Remove optimization in favour of reduced redundancy and code lines. 6 years ago
Shinji Suzuki b437771c2e Reduce indentation level. 6 years ago
Shinji Suzuki a3b7af23c2 Avoid having a match of (menu label|label) in the middle of a line.
Avoid loading cfg file twice.
6 years ago
multibootusb cb5703b712
Merge pull request #285 from shinji-s/devel
Simplify code by eliminating common expression.
6 years ago
Shinji Suzuki 88f98fe702 Simplify install_patch() thru common expression elimination and control
flow adjustment.
6 years ago
Shinji Suzuki cd9c85f2b3 Simplify resource_path() implementation by reducing repetition. 6 years ago
Shinji Suzuki a94cce01cf Simplify code by eliminating common expression. 6 years ago
multibootusb 0cc1064a57
Merge pull request #284 from shinji-s/devel
Replace '%INSTALL_DIR%' in isolinux.cfg with 'arch' if installing an …
6 years ago
Shinji Suzuki 18331de12e Replace '%INSTALL_DIR%' in isolinux.cfg with 'arch' if installing an arch variant. Needed for Antergos. 6 years ago
multibootusb 53bd5fe14a
Merge pull request #279 from shinji-s/devel
Fix typo in log message generation.
6 years ago
Shinji Suzuki f048774f33 Fix typo in log message generation. 6 years ago
multibootusb fbfa3e086d
Merge pull request #278 from shinji-s/devel
Fix aesthetic issue regarding character escapes in a path string.
6 years ago
Shinji Suzuki 9f60bb42ed Fix aesthetic issue regarding character escapes in a path string. 6 years ago
multibootusb 4fae60dbdb
Merge pull request #277 from shinji-s/devel
Allow setting of build related paths in an external file.
6 years ago
Shinji Suzuki dc23435a4d Allow setting of build related paths in an external file. 6 years ago
multibootusb 091c65c74a
Merge pull request #276 from shinji-s/devel
Merged from master.
6 years ago
Shinji Suzuki fd656ebeab Merge branch 'master' into devel 6 years ago
multibootusb 1f8c8e1a38
Merge pull request #275 from shinji-s/master
Avoid trying to update bootx64.efi and grub.img if source files are missing.
6 years ago
Shinji Suzuki 31a08eeb64 Avoid updating bootx64.efi and grub.img if source files are missing. 6 years ago
multibootusb d3c7aa7dc7
Merge pull request #274 from shinji-s/master
Have gpt_device() use 'wmi' module rather than spawn diskpart.exe
6 years ago