diff -Nru boot-repair-4ppa35/debian/changelog boot-repair-4ppa37/debian/changelog --- boot-repair-4ppa35/debian/changelog 2015-12-23 08:09:33.000000000 +0000 +++ boot-repair-4ppa37/debian/changelog 2016-04-26 23:00:08.000000000 +0000 @@ -1,5 +1,5 @@ -boot-repair (4ppa35) trusty; urgency=low +boot-repair (4ppa37) xenial; urgency=low * Sources creation - -- Yann MRN Thu, 23 Dec 2015 15:14:14 +0200 + -- Yann MRN Thu, 25 Dec 2015 15:14:14 +0200 diff -Nru boot-repair-4ppa35/usr/share/boot-sav/b-i-s.sh boot-repair-4ppa37/usr/share/boot-sav/b-i-s.sh --- boot-repair-4ppa35/usr/share/boot-sav/b-i-s.sh 2015-02-09 23:10:37.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/b-i-s.sh 2016-04-26 22:50:46.000000000 +0000 @@ -1,13 +1,14 @@ #!/bin/bash -VERSION='e7fc706 + Boot-Repair extra info'; -RELEASE_DATE='Boot-Info 9Feb2015'; +VERSION='cfd9efe + Boot-Repair extra info'; +RELEASE_DATE='Boot-Info 26Apr2016'; LAST_GIT_COMMIT_SHORTLOG=''; LAST_GIT_COMMIT_DATE=''; ################################################################################ # # # Copyright (c) 2009-2010 Ulrich Meierfrankenfeld # # Copyright (c) 2011-2012 Gert Hulselmans # -# Copyright (c) 2013-2015 Yann MRN # +# Copyright (c) 2013-2015 Andrei Borzenkov # +# Copyright (c) 2016 Yann MRN # # # # Permission is hereby granted, free of charge, to any person obtaining a copy # # of this software and associated documentation files (the "Software"), to # @@ -28,12 +29,10 @@ # IN THE SOFTWARE. # # # ################################################################################ -# Thanks to: caljohnsmith (ubuntuforums.org) # -# jsjgruber, Arvidjaar # -# # -# Upstream : # -# http://sourceforge.net/projects/bootinfoscript # +# Thanks to: meierfra, caljohnsmith, jsjgruber, Arvidjaar # # The birth of BIS: http://ubuntuforums.org/showthread.php?t=837791 # +# Gert's website: http://sourceforge.net/projects/bootinfoscript # +# Arvidjar website: https://github.com/arvidjaar/bootinfoscript # ################################################################################ @@ -129,9 +128,9 @@ # "bootinfoscript_YYYY-MM-DD_hh:mm:ss". update () { - local git_bis_start_url='http://sourceforge.net/p/bootinfoscript/code/ci'; - local git_bis_end_url='tree/bootinfoscript?format=raw'; - local git_commit_url='http://bootinfoscript.sourceforge.net/bis-last-commit.txt' + local git_ref_url='https://api.github.com/repos/arvidjaar/bootinfoscript/git/refs/heads/master' + local git_commit_url='https://api.github.com/repos/arvidjaar/bootinfoscript/git/commits' + local git_contents_url='https://github.com/arvidjaar/bootinfoscript/raw/master/bootinfoscript' # Check if date is available. if [ $(type date > /dev/null 2>&1 ; echo $?) -ne 0 ] ; then @@ -151,25 +150,25 @@ # Check if wget or curl is available if [ $(type wget > /dev/null 2>&1 ; echo $?) -eq 0 ] ; then printf '\nDownloading last development version of Boot Info Script from git:\n\n'; - LAST_GIT_COMMIT=$(wget -O - "${git_commit_url}" 2> /dev/null); - LAST_GIT_COMMIT_ID="${LAST_GIT_COMMIT:0:40}"; - LAST_GIT_COMMIT_DATE="${LAST_GIT_COMMIT:41:25}"; - LAST_GIT_COMMIT_SHORTLOG="${LAST_GIT_COMMIT:67}"; + LAST_GIT_COMMIT_ID=$(wget -O - "${git_ref_url}" | sed -ne 's/^.*"sha": "\(.*\)".*$/\1/p'); + LAST_GIT_COMMIT=$(wget -O - "${git_commit_url}/$LAST_GIT_COMMIT_ID"); - wget -O "${GIT_BIS_FILENAME}" "${git_bis_start_url}/${LAST_GIT_COMMIT_ID}/${git_bis_end_url}"; + wget -O "${GIT_BIS_FILENAME}" "${git_contents_url}"; elif [ $(type curl > /dev/null 2>&1 ; echo $?) -eq 0 ] ; then printf 'Downloading last development version of Boot Info Script from git:\n\n'; - LAST_GIT_COMMIT=$(curl "${git_commit_url}"); - LAST_GIT_COMMIT_ID="${LAST_GIT_COMMIT:0:40}"; - LAST_GIT_COMMIT_DATE="${LAST_GIT_COMMIT:41:25}"; - LAST_GIT_COMMIT_SHORTLOG="${LAST_GIT_COMMIT:67}"; + LAST_GIT_COMMIT_ID=$(curl "${git_ref_url}" | sed -ne 's/^.*"sha": "\(.*\)".*$/\1/p'); + LAST_GIT_COMMIT=$(curl "${git_commit_url}/$LAST_GIT_COMMIT_ID"); - curl -o "${GIT_BIS_FILENAME}" "${git_bis_start_url}/${LAST_GIT_COMMIT_ID}/${git_bis_end_url}"; + curl -o "${GIT_BIS_FILENAME}" "${git_contents_url}"; else printf '"wget" or "curl" could not be found.\nInstall at least one of them and try again.\n' >&2; exit 1; fi + # First date is Author, second date is Commit +# LAST_GIT_COMMIT_DATE=$(echo "${LAST_GIT_COMMIT}" | sed -ne 's/^[[:space:]]*"date": "\(.*\)"[[:space:]]*$/\1/p' | tail -1); +# LAST_GIT_COMMIT_SHORTLOG=$(echo "${LAST_GIT_COMMIT}" | sed -n -e '/^[[:space:]]*"message":/ { s/^[[:space:]]*"message": "\(.*\)",[[:space:]]*$/\1/ ; s/\\n.*$// ; p }'); + # Set the retrieval date in just downloaded script. sed -i -e "4,0 s@LAST_GIT_COMMIT_SHORTLOG='';@LAST_GIT_COMMIT_SHORTLOG='${LAST_GIT_COMMIT_SHORTLOG}';@" \ -e "5,0 s/LAST_GIT_COMMIT_DATE='';/LAST_GIT_COMMIT_DATE='${LAST_GIT_COMMIT_DATE}';/" \ @@ -601,6 +600,7 @@ PartitionTable=${Folder}/PT # File to store the Partition Table. FakeHardDrives=${Folder}/FakeHD # File to list devices which seem to have no corresponding drive. BLKID=${Folder}/BLKID # File to store the output of blkid. +GRUB200_Module=${Folder}/GRUB200_Module # File to store current grub2 module @@ -614,7 +614,7 @@ # # Support more than 26 drives. -All_Hard_Drives=$(ls /dev/hd[a-z] /dev/hd[a-z][a-z] /dev/sd[a-z] /dev/sd[a-z][a-z] /dev/vd[a-z] /dev/vd[a-z][a-z] 2>> ${Trash}); +All_Hard_Drives=$(ls /dev/hd[a-z] /dev/hd[a-z][a-z] /dev/sd[a-z] /dev/sd[a-z][a-z] /dev/xvd[a-z] /dev/vd[a-z] /dev/vd[a-z][a-z] 2>> ${Trash}); ## Add found RAID disks to list of hard drives. ## @@ -1030,7 +1030,7 @@ # Get ${first4} and ${second4} bytes at once. eval $(hexdump -v -s ${start} -n 8 -e '1/4 "first4=%u; " 1/4 "second4=%u"' ${device}); - echo $(( ${second4} * 1073741824 + ${first4} )); + echo $(( ${second4} * 4294967296 + ${first4} )); } @@ -1178,11 +1178,12 @@ ReadEFI () { local HI=$1 GPT_file=$2 drive size N=0 i=0 format label PRStart start end type size system; + local attrs attrstr attrs_other j; drive="${HDName[${HI}]}"; - format='%-10s %14s%14s%14s %s\n'; + format='%-10s %5s %14s%14s%14s %s\n'; - printf "${format}" 'Partition' 'Start Sector' 'End Sector' '# of Sectors' 'System' >> ${GPT_file}; + printf "${format}" 'Partition' 'Attrs' 'Start Sector' 'End Sector' '# of Sectors' 'System' >> ${GPT_file}; HDStart[${HI}]=$( Read8Bytes 552 ${drive}); HDEnd[${HI}]=$( Read8Bytes 560 ${drive}); @@ -1205,7 +1206,42 @@ system=$(UUIDToSystem ${type}); label=${drive}$((${i}+1)); - printf "${format}" "${label}" "$(InsertComma ${start})" "$(InsertComma ${end})" "$(InsertComma ${size})" "${system}" >> ${GPT_file}; + # Partition attributes are 8 bytes long and bash arithmetic is signed. + # High bits are used by Windows which automatically overflows computed + # 64 bit number. As we are interested in low bits only, just check it + # and output the rest verbatim if present. + attrs=$(hexdump -v -s $((${PRStart}+48+${PRSize}*${i})) -n 1 -e '/1 "%02x"' ${drive}); + attrs_other=$(hexdump -v -s $((${PRStart}+49+${PRSize}*${i})) -n 7 -e '/1 "%02x"' ${drive}); + + if (( 0x${attrs} & 1 )) ; then + attrstr='R'; + else + attrstr=' '; + fi + + if (( 0x${attrs} & 2 )) ; then + attrstr="N${attrstr}"; + else + attrstr=" ${attrstr}"; + fi + + if (( 0x${attrs} & 4 )) ; then + attrstr="B${attrstr}"; + else + attrstr=" ${attrstr}"; + fi + + if (( 0x${attrs} & 8 )) || [ ${attrs_other} != '00000000000000' ] ; then + attrstr="+$attrstr"; + echo >> ${Unknown_MBR}; + echo "${label}: unknown GPT attributes" >> ${Unknown_MBR}; + for (( j = 12; j >= 0; j -= 2 )) ; do + printf '%s' ${attrs_other:j:2} >> ${Unknown_MBR} + done + echo ${attrs} >> ${Unknown_MBR} + fi + + printf "${format}" "${label}" "${attrstr}" "$(InsertComma ${start})" "$(InsertComma ${end})" "$(InsertComma ${size})" "${system}" >> ${GPT_file}; NamesArray[${PI}]=${label}; DeviceArray[${PI}]=${label}; @@ -1219,6 +1255,8 @@ ParentArray[${PI}]=''; fi done + echo >> ${GPT_file}; + echo 'Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set' >> ${GPT_file}; } @@ -1731,18 +1769,27 @@ local hdd="$1"; local core_img_file="$2"; - local sector_nr fragment_size fragment_offset=1 block_list=500; + local sector_nr_low sector_nr_high sector_nr fragment_size; + local fragment_offset=1 block_list=500; # Assemble fragments from "hdd" passed to grub2_info. # Each block list entry is 12 bytes long and consists of - # 8 bytes = fragment start absolute disk offset in sectors - # 2 bytes = fragment size in sectors + # 8 bytes = fragment start absolute disk offset in sectors of 512 bytes + # 2 bytes = fragment size in sectors of 512 bytes # 2 bytes = memory segment to load fragment into # Entries start at the end of the first sector of core.img and # go down. End marker is all zeroes. + # + # Blocklists were changed to 64 bit in 2006, so all versions BIS detects + # should have it. + # + # Older versions of hexdump do not support 8 byte integers, so read + # high and low words separately. while [ ${block_list} -gt 12 ] ; do - sector_nr=$(hexdump -v -n 8 -s ${block_list} -e '1/8 "%u"' ${core_img_file}); + sector_nr_low=$(hexdump -v -n 4 -s ${block_list} -e '1/4 "%u"' ${core_img_file}); + sector_nr_high=$(hexdump -v -n 4 -s $((block_list+4)) -e '1/4 "%u"' ${core_img_file}); + let "sector_nr = (sector_nr_high << 32) + sector_nr_low"; if [ ${sector_nr} -eq 0 ] ; then return; fi @@ -1757,6 +1804,99 @@ ## Grub2 ## # +# Determine the embeded module name. This function implements manual +# parsing of ELF information to avoid dependency on binutils or similar. +# + +grub2_modname () +{ + local modfile=$1; + local file_size=$2; + local e_ehsize sht_offset sht_entsize sht_num sht_shdrndx sht_strtab; + local sht_strtabsize s_nameidx s_type s_name m_offset m_size; + local i=0; + + # ELF header is at least 52 bytes in size + if [ "${file_size}" -lt 52 ] ; then + return; + fi + + # ELF Magic + CLASS32 + LSB + VERSION + if [ "$(hexdump -n 7 -e '4/1 "%02x" 3/1 "%x"' "${modfile}")" != '7f454c46111' ] ; then + return; + fi + + # RELOCATABLE + MACHINE + VERSION + if [ "$(hexdump -s 16 -n 8 -e '2/2 "%x" 1/4 "%x"' "${modfile}")" != '131' ] ; then + return; + fi + + # ELF header size + e_ehsize=$(hexdump -s 40 -n 2 -e '"%u"' "${modfile}") + if [ "${e_ehsize}" -lt 52 -o "${e_ehsize}" -gt "${file_size}" ] ; then + return; + fi + + # Offset of section headers table + sht_offset=$(hexdump -s 32 -n 4 -e '"%u"' "${modfile}") + if [ "${sht_offset}" -lt "${e_ehsize}" -o "${sht_offset}" -ge "${file_size}" ] ; then + return; + fi + + # Size of section header + sht_entsize=$(hexdump -s 46 -n 2 -e '"%u"' "${modfile}") + + # Number of section headers + sht_num=$(hexdump -s 48 -n 2 -e '"%u"' "${modfile}") + if [ "${sht_entsize}" -eq 0 -o "${sht_num}" -eq 0 -o $((sht_offset + sht_entsize*sht_num)) -gt "${file_size}" ] ; then + return; + fi + + # Index of section names string table + sht_shdrndx=$(hexdump -s 50 -n 2 -e '"%u"' "${modfile}") + if [ "${sht_shdrndx}" -ge "${sht_num}" ] ; then + return; + fi + + # Offset of section names string table + sht_strtab=$(hexdump -s $((sht_offset + $((sht_shdrndx*sht_entsize)) + 16)) -n 4 -e '"%u"' "${modfile}"); + if [ "${sht_strtab}" -lt "${e_ehsize}" -o "${sht_strtab}" -ge "${file_size}" ] ; then + return; + fi + + # Size of section names string table + sht_strtabsize=$(hexdump -s $((sht_offset + $((sht_shdrndx*sht_entsize)) + 20)) -n 4 -e '"%u"' "${modfile}"); + if [ "${sht_strtabsize}" -eq 0 -o "${sht_strtabsize}" -gt "$((file_size-sht_strtab))" ] ; then + return; + fi + + while [ "${i}" -lt $((sht_entsize*sht_num)) ] ; do + s_nameidx=$(hexdump -s $((sht_offset + i)) -n 4 -e '"%u"' "${modfile}"); + if [ "${s_nameidx}" -lt "${sht_strtabsize}" ] ; then + s_type=$(hexdump -s $((sht_offset + i + 4)) -n 4 -e '"%u"' "${modfile}"); + # PROGBITS + if [ "${s_type}" -eq 1 ] ; then + s_name=$(hexdump -s $((sht_strtab + s_nameidx)) -n "${sht_strtabsize}" -e "1/${sht_strtabsize} \"%s\"" "${modfile}"); + if [ "${s_name}" = '.modname' ] ; then + m_offset=$(hexdump -s $((sht_offset + i + 16)) -n 4 -e '"%u"' "${modfile}"); + m_size=$(hexdump -s $((sht_offset + i + 20)) -n 4 -e '"%u"' "${modfile}"); + if [ $((m_offset + m_size)) -lt "${file_size}" ] ; then + hexdump -s "${m_offset}" -n "${m_size}" -e "/${m_size} \"%s\"" "${modfile}"; + return + fi + fi + fi + fi + : $((i+=sht_entsize)) + done + + # Display "???" as indication that parsing failed + printf '%s' '???' + return +} + +## Grub2 ## +# # Determine the (embeded) location of core.img for a Grub2 boot.img file, # determine the path of the grub2 directory and look for an embedded config file. # @@ -1777,7 +1917,8 @@ local grub_module_info_offset grub_module_magic grub_modules_offset grub_modules_size; local grub_module_type grub_module_size grub_module_header_offset grub_modules_end_offset; local lzma_compressed_size reed_solomon_redundancy reed_solomon_length boot_dev boot_drive; - local core_img_flavour='detect'; + local core_img_flavour='detect' modname all_modules need_core_prologue=0; + local grub_module_header_next; > ${core_img_file_type_2} @@ -1793,9 +1934,16 @@ # BIOS drive number on which grub2 looks for its second stage (=core.img): # - "0xff" means that grub2 will use the BIOS drive number passed via the DL register. # - if this value isn't "0xff", that value will used instead. + # Since version 1.97 GRUB2 is using only 0xff. We cannot reliably determine BIOS numbers + # anyway, so just skip core.img detection in this case. drive_nr_hex=$(hexdump -v -s ${drive_offset} -n 1 -e '"0x%02x"' "${stage1}" 2>> ${Trash}); drive_nr=$(( ${drive_nr_hex} - 127 )); + if [ "${drive_nr_hex}" != '0xff' ] ; then + Grub2_Msg="is configured to load core.img from BIOS drive ${drive_nr} (${drive_nr_hex}) instead of using the boot drive passed by the BIOS"; + return + fi + Grub2_Msg="looks at sector ${sector_nr} of the same hard drive for core.img"; @@ -1812,7 +1960,10 @@ dd if="${stage1}" of=${core_img_file} skip=${sector_nr} count=1024 2>> ${Trash}; else # Use "hdd" passed to grub2_info. - dd if="${hdd}" of=${core_img_file} skip=${sector_nr} count=1024 2>> ${Trash}; + # First make sure to collect core.img fragments. Read the first block of + # core.img and assemble it further from blocklists + dd if="${hdd}" of=${core_img_file} skip=${sector_nr} count=1 2>> ${Trash}; + grub2_read_blocklist "${hdd}" ${core_img_file}; fi magic=$(hexdump -v -n 4 -e '/1 "%02x"' ${core_img_file}); @@ -1935,12 +2086,6 @@ fi elif [ "${grub2_version}" = '2.00' ] ; then - # First make sure to collect core.img fragments if it is - # embedded. - if [ "${core_source}" = 'disk' ] || [ "${core_source}" = 'partition' ] ; then - grub2_read_blocklist "${hdd}" ${core_img_file}; - fi - # For Grub2 (v2.00), the core_dir is stored in the compressed part of core.img in the same # way as the modules and embedded config file. @@ -2009,13 +2154,39 @@ # embedded config and prefix become 3 and 4 on fedora. while [ ${grub_module_header_offset} -lt ${grub_modules_end_offset} ] ; do + if [ $(( ${grub_modules_end_offset} - ${grub_module_header_offset} )) -lt 8 ] ; then + echo 'Remaining space in GRUB2 module list too short for a module' >&2; + all_modules="${all_modules} "; + need_core_prologue=1; + break + fi + eval $( hexdump -v -n 8 -s ${grub_module_header_offset} -e '1/4 "grub_module_type=%u; " 1/4 "grub_module_size=%u;"' ${core_img_file_unlzma} ); + # Next module is always aligned on 4 bytes boundary on i386, + # but sometimes grub stores shorter size. Make sure to adjust it. + grub_module_header_next=$(( ${grub_module_header_offset} + 8 + (((${grub_module_size} - 8 + 3) >> 2) << 2) )); + + if [ ${grub_module_header_next} -gt ${grub_modules_end_offset} ] ; then + printf 'GRUB2 module size too large; skipping remaining modules. Size left: %d\n' $(( {grub_modules_end_offset} - ${grub_module_header_offset} )) >&2; + all_modules="${all_modules} "; + need_core_prologue=1; + break + fi - if [ ${grub_module_type} -eq 1 ] ; then + if [ ${grub_module_type} -eq 0 ] ; then + # Regular ELF module + dd count=$(( grub_module_size - 8 )) skip=$(( grub_module_header_offset + 8 )) if=${core_img_file_unlzma} of=${GRUB200_Module} bs=1 2>> ${Trash}; + modname=$(grub2_modname ${GRUB200_Module} $(( grub_module_size - 8 ))); + if [ -n "${modname}" ] ; then + all_modules="${all_modules} ${modname}"; + need_core_prologue=1; + fi + elif [ ${grub_module_type} -eq 1 ] ; then # "stale" ELF module on fedora or memory disk everywhere else if [ ${core_img_flavour} = 'detect' ] ; then if [ "$(hexdump -v -n 4 -s $((grub_module_header_offset+8)) -e '"%c"' ${core_img_file_unlzma})" = $'\x7f''ELF' ] ; then # fedora "stale" ELF module + # TODO display Fedora stale modules core_img_flavour='fedora'; else core_img_flavour='upstream'; @@ -2032,9 +2203,10 @@ if [ ${core_img_flavour} = 'upstream' ] ; then # This module is an embedded config file. embedded_config_found=1; + need_core_prologue=1; - # Remove padding "\0"'s at the end. - embedded_config=$( hexdump -v -n $(( ${grub_module_size} - 8 )) -s $(( ${grub_module_header_offset} + 8 )) -e '"%_c"' ${core_img_file_unlzma} | sed -e 's/\(\\0\)\+$//'); + # Remove padding starting with the first "\0" at the end. + embedded_config=$( hexdump -v -n $(( ${grub_module_size} - 8 )) -s $(( ${grub_module_header_offset} + 8 )) -e '"%_c"' ${core_img_file_unlzma} | sed -e 's/\(\\0\).*$//'); fi elif [ ${grub_module_type} -eq 3 ] ; then @@ -2056,9 +2228,10 @@ elif [ ${core_img_flavour} = 'fedora' ] ; then # This module is an embedded config file. embedded_config_found=1; + need_core_prologue=1; - # Remove padding "\0"'s at the end. - embedded_config=$( hexdump -v -n $(( ${grub_module_size} - 8 )) -s $(( ${grub_module_header_offset} + 8 )) -e '"%_c"' ${core_img_file_unlzma} | sed -e 's/\(\\0\)\+$//'); + # Remove padding starting with the first "\0" at the end. + embedded_config=$( hexdump -v -n $(( ${grub_module_size} - 8 )) -s $(( ${grub_module_header_offset} + 8 )) -e '"%_c"' ${core_img_file_unlzma} | sed -e 's/\(\\0\).*$//'); fi elif [ ${grub_module_type} -eq 4 ] ; then @@ -2084,7 +2257,7 @@ fi fi - grub_module_header_offset=$(( ${grub_module_header_offset} + ${grub_module_size} )); + grub_module_header_offset=${grub_module_header_next}; done fi @@ -2115,9 +2288,10 @@ fi if [ ${core_img_flavour} = 'upstream' ] ; then embedded_config_found=1; + need_core_prologue=1; - # Remove padding "\0"'s at the end. - embedded_config=$( hexdump -v -e '"%_c"' ${core_img_file_type_2} | sed -e 's/\(\\0\)\+$//' ); + # Remove padding starting with the first "\0" at the end. + embedded_config=$( hexdump -v -e '"%_c"' ${core_img_file_type_2} | sed -e 's/\(\\0\).*$//' ); fi fi fi @@ -2129,10 +2303,6 @@ else # core.img found. - if [ "${drive_nr_hex}" != '0xff' ] ; then - Grub2_Msg="${Grub2_Msg}. Grub2 is configured to load core.img from BIOS drive ${drive_nr} (${drive_nr_hex}) instead of using the boot drive passed by the BIOS"; - fi - Grub2_Msg="${Grub2_Msg}. core.img is at this location"; # In GRUB 2.00 core.img prefix is optional @@ -2149,10 +2319,21 @@ fi fi + if [ ${need_core_prologue} -eq 1 ] ; then + Grub2_Msg=$(printf "${Grub2_Msg}. It also embeds following components:"); + fi + + if [ -n "${all_modules}" ] ; then + + all_modules="${all_modules# }"; + Grub2_Msg=$(printf "${Grub2_Msg}\n\nmodules\n--------------------------------------------------------------------------------\n${all_modules}\n--------------------------------------------------------------------------------"); + + fi + if [ ${embedded_config_found} -eq 1 ] ; then # Embedded config file found. - Grub2_Msg=$(printf "${Grub2_Msg} and uses an embedded config file:\n\n--------------------------------------------------------------------------------\n${embedded_config}\n--------------------------------------------------------------------------------\n"); + Grub2_Msg=$(printf "${Grub2_Msg}\n\nconfig script\n--------------------------------------------------------------------------------\n${embedded_config}\n--------------------------------------------------------------------------------"); fi fi @@ -2205,6 +2386,7 @@ last_block_of_file () { local display='0'; + local BlockSize Fragments Filefrag_Format EndGiByte EndGByte; # Remove an existing ${Tmp_Log} log. rm -f ${Tmp_Log}; @@ -2213,57 +2395,110 @@ for file in "$@" ; do if [[ -f "${file}" ]] && [[ -s "${file}" ]] && FileNotMounted "${mountname}/${file}" "${mountname}" ; then - # There are at least 2 versions of filefrag. - # For both versions, we can get the blocksize and the location of the block - # of the file that is the farest away from the beginning of the disk. - # For the newer version, we can also get the number of file fragments. + # There are 4 versions of e2fsprogs filefrag output. + # In all cases final line could be "1 extent" instead. + # + # v1 + # Blocksize of file %s is %d + # File size of %s is %lld (%d blocks) + # %s: %d extents found[, perfection would be %d extent%s] + # + # v2 + # Blocksize of file %s is %d + # File size of %s is %lld (%d blocks) + # First block: %ld + # Last block: %ld + # %s: %d extents found[, perfection would be %d extent%s] + # + # v3 + # File size of %s is %lld (%ld block%s, blocksize %d) + # ext logical physical expected length flags + # 0 nnn nnn nnn xxx + # 1 nnn nnn nnn nnn xxx + # ... + # %s: %d extents found[, perfection would be %d extent%s] + # + # v4 + # File size of %s is %llu (%lu block%s of %d bytes) + # ext: logical_offset: physical_offset: length: expected: flags: + # 0: nnn.. nnn: nnn.. nnn: nnn: xxx + # 1: nnn.. nnn: nnn.. nnn: nnn: nnn: xxx + # ... + # %s: %d extents found[, perfection would be %d extent%s] + # + # FIXME e2fsprogs filefrag output "Last block:", not "Last Block:". + # Was there yet another filefrag implementation? + # + # XXX Original code metioned filefrag output that can show last + # block but not number of extents. Unless there was some other + # implementation of filefrag, it does not match e2fsprogs sources. + # + # XXX Can we hit files with spaces (field count is wrong then)? eval $(filefrag -v "${file}" \ - | ${AWK} -F ' ' 'BEGIN { blocksize=0; expected=0; extents=1; ext_ind=0; last_ext_loc=0; ext_length=0; filefrag_old="false"; last_block=0 } \ - { if ( $1 == "Blocksize" ) { blocksize=$6; filefrag_old="true" }; \ - if ( filefrag_old == "true" ) { \ - if ( $1$2 ~ "LastBlock:" ) { print $3 }; \ - } else { \ - if ( $(NF-1) == "blocksize" ) { blocksize = substr($NF,0,length($NF) - 1) }; \ - if ( expected != 0 && ext_ind == $1 ) { \ - ext_ind += 1; \ - if ( last_ext_loc < $3 ) { \ - last_ext_loc = $3; \ - if ( substr($0, expected, 1) == " " ) { \ - ext_length = $4; } \ - else { \ - ext_length = $5; \ + | ${AWK} -F ' ' 'BEGIN { blocksize=0; expected=0; extents=0; ext_ind=0; last_ext_loc=0; ext_length=0; filefrag_format=""; last_block=0 } \ + { if ( $1 == "Blocksize" ) { blocksize=$6; filefrag_format="v1"; }; \ + if ( filefrag_format == "v1" ) { \ + if ( $1$2 ~ "LastBlock:" ) { last_block = $3 }; \ + } else if ( $(NF-1) == "blocksize" ) { \ + blocksize = substr($NF,0,length($NF) - 1); \ + filefrag_format = "v3"; \ + } else if ( $(NF) == "bytes)" ) { \ + blocksize = $(NF-1); \ + filefrag_format = "v4"; \ + FS=" *|: *|[.][.] *"; \ + } \ + if ( expected != 0 ) { \ + if ( filefrag_format == "v3" && ext_ind == $1 ) { \ + if ( last_ext_loc < $3 ) { \ + last_ext_loc = $3; \ + if ( substr($0, expected, 1) == " " ) { \ + ext_length = $4; } \ + else { \ + ext_length = $5; \ + } \ } \ + } else if ( filefrag_format == "v4" && ext_ind == $2 ) { \ + if ( last_block < $6 ) { \ + last_block = $6; \ } \ - } \ - if ($4 == "expected") { \ - expected= index($0,"expected") + 7; }; \ - if ($3 == "extents") { \ - extents=$2; \ } \ - } } END { \ - if ( filefrag_old == "true" ) { \ - bogus = last_block; \ - EndByte = last_block * blocksize + 512 * '${start}'; \ - printf "BlockSize=" blocksize "; Filefrag_Old=" filefrag_old "; " \ - } else { \ - bogus = last_ext_loc; \ - EndByte = ( last_ext_loc + ext_length ) * blocksize + 512 * '${start}'; \ - printf "BlockSize=" blocksize "; Fragments=" extents "; Filefrag_Old=" filefrag_old "; " \ + ext_ind += 1; \ + } else { \ + if ( filefrag_format == "v3" && $4 == "expected" ) { \ + expected= index($0,"expected") + 7; \ + } else if ( filefrag_format == "v4" && $2 == "ext" ) { \ + expected = 1; \ + } \ + } \ + if ( $3 == "extents" ) { \ + extents = $2; \ + } else if ( $3 == "extent" ) { \ + extents = 1; \ + } \ + } \ + END { \ + if ( filefrag_format == "v3" ) { \ + last_block = last_ext_loc + ext_length; \ } \ - if ( ( bogus == 0) || ( extents == 0 ) ) { \ + printf "BlockSize=" blocksize "; Fragments=" extents "; Filefrag_Format=" filefrag_format "; "; \ + if ( last_block == 0 ) { \ printf "EndGiByte=??; EndGByte=??;" \ } else { \ + EndByte = last_block * blocksize + 512 * '${start}'; \ printf "EndGiByte=%.9f; EndGByte=%.9f;", EndByte / 1024 ^ 3, EndByte / 1000 ^ 3; \ } \ }'); + if [ "${Filefrag_Format}" = '' ] ; then + echo "Unknown filefrag output format" >&2; + return 0; + fi + if [ "${BlockSize}" -ne 0 ] ; then - if [ "${Filefrag_Old}" = "true" ] ; then - # Old version of filefrag. + if [ "${Fragments}" -eq 0 ] ; then printf "%14s = %-14s %s\n" "${EndGiByte}" "${EndGByte}" "${file}" >> ${Tmp_Log}; else - # New version of filefrag. printf "%14s = %-14s %-45s %2s\n" "${EndGiByte}" "${EndGByte}" "${file}" "${Fragments}" >> ${Tmp_Log}; fi fi @@ -2446,12 +2681,15 @@ 0000) # If the first two bytes are zero, the boot sector does not contain any boot loader. BST='-';; - *) BST='Unknown'; - printf "Unknown BootLoader on ${name}\n\n" >> ${Unknown_MBR}; - hexdump -n 512 -C ${part} >> ${Unknown_MBR}; - echo >> ${Unknown_MBR};; esac + if [ x"${BST}" = 'x' ] ; then + BST='Unknown'; + printf "Unknown BootLoader on ${name}\n\n" >> ${Unknown_MBR}; + hexdump -n 512 -C ${part} >> ${Unknown_MBR}; + echo >> ${Unknown_MBR}; + fi + # Display the boot sector type. echo " Boot sector type: ${BST}" >> "${Log}"; @@ -2569,7 +2807,7 @@ ## Display boot sector info. ## printf ' Boot sector info: ' >> "${Log}"; - printf "${BSI}\n" | fold -s -w 55 | sed -e '/^-------------------------$/ d' -e '2~1s/.*/ &/' >> "${Log}"; + printf "${BSI}\n" | fold -s -w 55 | sed -e '/^-------------------------\.\?$/ d' -e '2~1s/.*/ &/' >> "${Log}"; @@ -2633,6 +2871,7 @@ [ -s "${mountname}/etc/redhat-release" ] && OS=$(cat "${mountname}"/etc/redhat-release | tr -d '\n'); + [ -s "${mountname}/etc/os-release" ] && grep -q '^PRETTY_NAME=' "${mountname}/etc/os-release" && OS=$(eval "$(grep '^PRETTY_NAME=' "${mountname}"/etc/os-release)"; printf '%s' "${PRETTY_NAME}" | tr -d '\n'); ## Search for the files in ${Bootfiles} ## @@ -2791,15 +3030,13 @@ cd "${mountname}/"; - if [ $( last_block_of_file ${GrubError18_Files} ; echo $? ) -ne 0 ] \ - && [ -e ${Tmp_Log} ] ; then + if [ $( last_block_of_file ${GrubError18_Files} ; echo $? ) -ne 0 ] ; then titlebar_gen "${name}" ': Location of files loaded by Grub'; printf "%11sGiB - GB%13sFile%33sFragment(s)\n\n" ' ' ' ' ' ' >> "${Log1}"; cat ${Tmp_Log} >> "${Log1}"; fi - if [ $( last_block_of_file ${SyslinuxError_Files} ; echo $? ) -ne 0 ] \ - && [ -e ${Tmp_Log} ] ; then + if [ $( last_block_of_file ${SyslinuxError_Files} ; echo $? ) -ne 0 ] ; then titlebar_gen "${name}" ': Location of files loaded by Syslinux'; printf "%11sGiB - GB%13sFile%33sFragment(s)\n\n" ' ' ' ' ' ' >> "${Log1}"; cat ${Tmp_Log} >> "${Log1}"; @@ -2996,6 +3233,7 @@ MBR_bytes80to81="${MBR_512:256:4}"; + BL=; case ${MBR_sig2} in eb48) ## Grub Legacy is in the MBR. ## @@ -3038,7 +3276,7 @@ eb4c) ## Grub2 (v1.96) is in the MBR. ## BL='Grub2 (v1.96)'; - grub2_info ${drive} ${drive} '1.96' 'drive'; + grub2_info ${drive} ${drive} '1.96' 'disk'; Message="${Message} and ${Grub2_Msg}";; @@ -3048,7 +3286,7 @@ 0020) grub2_version='1.99-2.00'; BL='Grub2 (v1.99-2.00)';; esac - grub2_info ${drive} ${drive} ${grub2_version} 'drive'; + grub2_info ${drive} ${drive} ${grub2_version} 'disk'; # Set a more exact version number (1.99 or 2.00), if '1.99-2.00' was # passed to the grub2_info function. @@ -3059,7 +3297,7 @@ 0ebe) BL='ThinkPad';; 31c0) # Look at the first 8 bytes of the hard drive to identify the boot code installed in the MBR. case ${MBR_sig8} in - 31c08ed0bc007c8e) BL='SUSE generic MBR';; + 31c08ed0bc007c8e) BL='NetBSD/SUSE generic MBR';; 31c08ed0bc007cfb) BL='Acer PQService MBR';; esac;; 33c0) # Look at the first 3 bytes of the hard drive to identify the boot code installed in the MBR. @@ -3075,16 +3313,28 @@ esac;; esac;; 33c090) BL='DiskCryptor';; - 33c0fa) BL='Syslinux MBR (4.04 and higher)';; + 33c0fa) # Look at bytes 0x5B-5D: different offsets for jump target + case ${MBR_512:182:6} in + 0fb6c6) BL='Syslinux GPTMBR (5.10 and higher)';; + bb007c) BL='Syslinux GPTMBR (4.04-5.01)';; + e82101) BL='Syslinux MBR (4.04-4.07)';; + e83501) BL='Syslinux MBR (5.00 and higher)';; + esac;; esac;; 33ed) # Look at bytes 0x80-0x81 to be more specific about the Syslinux variant/version. case ${MBR_bytes80to81} in - 407c) BL='ISOhybrid (Syslinux 4.04 and higher)';; - 83e1) BL='ISOhybrid with partition support (Syslinux 4.04 and higher)';; + 407c) BL='ISOhybrid (Syslinux 4.04)';; + 83e1) BL='ISOhybrid with partition support (Syslinux 4.04)';; + cd13) BL='ISOhybrid with partition support (Syslinux 4.05 and higher)';; + f7e1) BL='ISOhybrid (Syslinux 4.05 and higher)';; esac;; 33ff) BL='HP/Gateway';; b800) BL='Plop';; - ea05) BL='XOSL';; + ea05) + case ${MBR_sig3} in + ea0500) BL='OpenBSD generic MBR';; + ea0501) BL='XOSL';; + esac;; ea1e) BL='Truecrypt Boot Loader';; eb04) BL='Solaris';; eb31) BL='Paragon';; @@ -3105,6 +3355,16 @@ 7cb8) BL='Syslinux MBR (3.36-3.51)';; b442) BL='Syslinux MBR (3.00-3.35)';; bb00) BL='Syslinux MBR (3.52-3.60)';; + e2f8) # Syslinux pre-4.04; look at bytes 0x82-0x84 + case "${MBR_512:260:6}" in + 31f65f) BL='Syslinux GPTMBR (4.00-4.03)';; + 5e5974) BL='Syslinux GPTMBR (3.72-3.73)';; + 5e5958) # look at bytes 0xe-0xf + case "${MBR_512:28:4}" in + 528e) BL='Syslinux GPTMBR (3.70-3.71)';; + 8ec0) BL='Syslinux GPTMBR (3.74-4.03)';; + esac;; + esac;; e879) BL='ISOhybrid (Syslinux 3.74-3.80)';; esac;; fa31c9) BL='Master Boot LoaDeR';; @@ -3122,21 +3382,27 @@ fab8) # Look at the first 4 bytes of the hard drive to identify the boot code installed in the MBR. case ${MBR_sig4} in fab80000) BL='FreeDOS (eXtended FDisk)';; - fab8* ) BL="No boot loader";; - esac;; - fabe) BL='No boot loader?';; + fab80010) BL="libparted MBR boot code";; + esac;; faeb) BL='Lilo';; fafc) BL='ReactOS';; - fc31) BL='Testdisk';; + fc31) # Look at the first 8 bytes of the hard drive to identify the boot code installed in the MBR. + case ${MBR_sig8} in + fc31c08ed031e48e) BL='install-mbr/Testdisk';; + fc31c08ec08ed88e) BL='boot0 (FreeBSD)';; + esac;; fc33) BL='GAG';; fceb) BL='BootIt NG';; 0000) BL='No boot loader';; - *) BL='No known boot loader'; - printf "Unknown MBR on ${drive}\n\n" >> ${Unknown_MBR}; - hexdump -v -n 512 -C ${drive} >> ${Unknown_MBR}; - echo >> ${Unknown_MBR};; esac + if [ x"${BL}" = 'x' ] ; then + BL='No known boot loader'; + printf "Unknown MBR on ${drive}\n\n" >> ${Unknown_MBR}; + hexdump -v -n 512 -C ${drive} >> ${Unknown_MBR}; + echo >> ${Unknown_MBR}; + fi + ## Output message at beginning of summary that gives MBR info for each drive: ## @@ -3268,11 +3534,10 @@ continue fi name="${LVM2_VG_NAME}-${LVM2_LV_NAME}"; - LVM="/dev/mapper/${name}"; + LVM="/dev/mapper/${LVM2_VG_NAME//-/--}-${LVM2_LV_NAME//-/--}"; LVM_Size=${LVM2_LV_SIZE:0:-1}; LVM_Status=${LVM2_LV_ATTR:4:1}; lvchange -ay ${LVM}; - name=${LVM:12}; mountname="LVM/${name}"; kind='LVM'; start=0; diff -Nru boot-repair-4ppa35/usr/share/boot-sav/boot-info-gui.sh boot-repair-4ppa37/usr/share/boot-sav/boot-info-gui.sh --- boot-repair-4ppa35/usr/share/boot-sav/boot-info-gui.sh 2014-11-22 21:31:36.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/boot-info-gui.sh 2016-04-24 23:25:58.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa35/usr/share/boot-sav/boot-info.sh boot-repair-4ppa37/usr/share/boot-sav/boot-info.sh --- boot-repair-4ppa35/usr/share/boot-sav/boot-info.sh 2014-11-22 01:20:54.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/boot-info.sh 2016-04-24 23:23:09.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -13,10 +13,10 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . -PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface +PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface APPNAME=boot-info CLEANNAME=Boot-Info -. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-uninstaller and boot-repair +. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-un & b-r gui_init if [[ "$choice" != exit ]];then check_os_and_mount_blkid_partitions_gui diff -Nru boot-repair-4ppa35/usr/share/boot-sav/boot-repair-actions.sh boot-repair-4ppa37/usr/share/boot-sav/boot-repair-actions.sh --- boot-repair-4ppa35/usr/share/boot-sav/boot-repair-actions.sh 2014-12-29 20:50:18.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/boot-repair-actions.sh 2016-04-26 22:09:48.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa35/usr/share/boot-sav/boot-repair.sh boot-repair-4ppa37/usr/share/boot-sav/boot-repair.sh --- boot-repair-4ppa35/usr/share/boot-sav/boot-repair.sh 2013-02-24 23:22:16.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/boot-repair.sh 2016-04-24 23:22:38.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -13,10 +13,10 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . -PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface +PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface APPNAME=boot-repair CLEANNAME="Boot Repair" -. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-uninstaller and boot-repair +. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-un & b-r gui_init if [[ "$choice" != exit ]];then check_os_and_mount_blkid_partitions_gui diff -Nru boot-repair-4ppa35/usr/share/boot-sav/gui-g2slaunch.sh boot-repair-4ppa37/usr/share/boot-sav/gui-g2slaunch.sh --- boot-repair-4ppa35/usr/share/boot-sav/gui-g2slaunch.sh 2014-12-13 22:25:24.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/gui-g2slaunch.sh 2016-04-24 23:21:04.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -30,12 +30,12 @@ local G2S PACK PACKNEW PACKOLD vvv ppa PPADEB removdeb # Ask root privileges if [[ $EUID -ne 0 ]];then - if hash gksudo;then + if hash sudo && [ "$(grep -E '(boot=casper)|(boot=live)' /proc/cmdline)" ];then + sudo $APPNAME & + elif hash gksudo;then gksudo $APPNAME & #gksu and su dont work in Kubuntu elif hash gksu;then gksu $APPNAME & #TODO PolicyKit http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=492493 - elif hash sudo && [ "$(grep -E '(boot=casper)|(boot=live)' /proc/cmdline)" ];then - sudo $APPNAME & elif hash su;then su -c $APPNAME & else diff -Nru boot-repair-4ppa35/usr/share/boot-sav/gui-raid-lvm.sh boot-repair-4ppa37/usr/share/boot-sav/gui-raid-lvm.sh --- boot-repair-4ppa35/usr/share/boot-sav/gui-raid-lvm.sh 2014-12-30 21:45:48.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/gui-raid-lvm.sh 2016-04-26 21:46:42.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa35/usr/share/boot-sav/gui-tab-other.sh boot-repair-4ppa37/usr/share/boot-sav/gui-tab-other.sh --- boot-repair-4ppa35/usr/share/boot-sav/gui-tab-other.sh 2015-01-01 23:04:25.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/gui-tab-other.sh 2016-04-26 22:09:08.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2015 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -67,7 +67,7 @@ echo "SET@_label_translate.set_text('''$Translate''')" echo "SET@_label_thanks.set_text('''$Thanks''')" echo "SET@_label_gpl.set_markup('''GNU-GPL v3''')" -echo "SET@_label_copyright.set_markup('''(C) 2010-2015 Yann MRN''')" +echo "SET@_label_copyright.set_markup('''(C) 2010-2016 Yann MRN''')" echo "SET@_backupwindow.set_title('''$APPNAME2''')" echo "SET@_label_pleasechoosebackuprep.set_text('''${Please_choose_folder_to_put_backup}\\n$USB_disk_recommended''')" echo "SET@_label_backup_table.set_text('''$Backup_table''')" @@ -82,7 +82,6 @@ ######################################### LOOP OF THE GLADE2SCRIPT INTERFACE ############################### # inputs : user interactions # outputs : the Glade interface managed by the Bash script -# used by : boot-repair and os-uninstaller loop_of_the_glade2script_interface() { while read ligneg2s;do if [[ ${ligneg2s} =~ GET@ ]] diff -Nru boot-repair-4ppa35/usr/share/boot-sav/gui-translations.sh boot-repair-4ppa37/usr/share/boot-sav/gui-translations.sh --- boot-repair-4ppa35/usr/share/boot-sav/gui-translations.sh 2014-12-21 20:51:52.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/gui-translations.sh 2016-04-26 21:46:36.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa35/usr/share/boot-sav/os-uninstaller.sh boot-repair-4ppa37/usr/share/boot-sav/os-uninstaller.sh --- boot-repair-4ppa35/usr/share/boot-sav/os-uninstaller.sh 2013-04-07 16:04:09.000000000 +0000 +++ boot-repair-4ppa37/usr/share/boot-sav/os-uninstaller.sh 2016-04-24 23:23:36.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -13,10 +13,10 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . -PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface +PID=$$; FIFO=/tmp/FIFO${PID}; mkfifo ${FIFO} #Initialization of the Glade2script interface APPNAME=os-uninstaller CLEANNAME=OS-Uninstaller -. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-uninstaller and boot-repair +. /usr/share/boot-sav/gui-init.sh #Start librairies common to os-uni & b-r gui_init if [[ "$choice" != exit ]];then check_os_and_mount_blkid_partitions_gui