Hi Jamie

The thing i' having i don't know if it's a bug or what is it, but the thing
is that ubuntu was already installed and then on the progress bar it
freezes, i'm new at Linux, i have ubuntu 8.10. i got some help about how to
publish the info i mentioned in the bug, and then no reply


On Thu, Jun 4, 2009 at 1:20 AM, Jamie Strandboge <[email protected]> wrote:

> Thank you for using Ubuntu and taking the time to report a bug. Your
> report should contain, at a minimum, the following information so we can
> better find the source of the bug and work to resolve it.
>
> Submitting the bug about the proper source package is essential. For
> help see https://wiki.ubuntu.com/Bugs/FindRightPackage . Additionally,
> in the report please include:
>
> 1) The release of Ubuntu you are using, via 'cat /etc/lsb-release' or
> System -> About Ubuntu.
> 2) The version of the package you are using, via 'dpkg -l PKGNAME | cat' or
> by checking in Synaptic.
> 3) What happened and what you expected to happen.
>
> The Ubuntu community has also created debugging procedures for a wide
> variety of packages at https://wiki.ubuntu.com/DebuggingProcedures .
> Following the debugging instructions for the affected package will make
> your bug report much more complete. Thanks!
>
>
> ** Visibility changed to: Public
>
> ** This bug is no longer flagged as a security vulnerability
>
> ** Changed in: ubuntu
>       Status: New => Invalid
>
> --
> Ubuntu freezes on Startup
> https://bugs.launchpad.net/bugs/382069
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Ubuntu: Invalid
>
> Bug description:
> ##################################################
> #####################################
>
> ##################################################
> ###########################################
> ########## Determine the embeded location of core.img for a Grub2 stage1
> file,
> ########## look for the core.img and, the path of the Grub Folder.
> ##################################################
> ###########################
>
> core_loc (){
> local stage1=$1 hi;
> offset=$(hexdump -v -s 68 -n 4 -e '4 "%u"' $stage1 2>>$Trash);
> dr=$(hexdump -v -s 76 -n 1 -e '"%d"' $stage1);
> pa="T"
> for hi in ${!hdna...@]};
> do
> hdd=${HDName[$hi]};
> if [ $offset -lt ${HDSize[hi]} ];
> then
> tmp=$(dd if=$hdd skip=$offset count=1 2>>$Trash | hexdump -v -n 4 -e
> '"%x"');
> if [ "$tmp" = 1bbe5652 ]; ### If conf.img file was found.
> then
> dd if=$hdd skip=$((offset+1)) count=1 of=$Tmp_Log 2>>$Trash;
> pa=$(hexdump -v -s 20 -n 1 -e '"%d"' $Tmp_Log);
> core_hdd=$hdd;
> Grub_String=$(hexdump -v -s 32 -n 64 -e '"%_u"' $Tmp_Log);
> Core_Dir=$(echo $Grub_String | sed s/nul[^$]*//);
> fi;
> fi;
> done;
> dr=$((dr-127))
> Core_Msg=$(echo looks at sector $offset )
> if [ "$dr" = 128 ];
> then
> Core_Msg=$(echo $Core_Msg of the same hard drive)
> else
> Core_Msg=$(echo $Core_Msg on boot drive \#$dr)
> fi;
> Core_Msg=$(echo $Core_Msg for core.img);
>
> if [ "$pa" = "T" ] #### core.img found.
> then
> Core_Msg=$(echo $Core_Msg, but core.img can not be found at this
> location.);
> else
> pa=$((pa+1))
> Core_Msg=$(echo $Core_Msg and on )
> if [ "$pa" = 256 ];
> then
> Core_Msg=$(echo $Core_Msg the same partition)
> else
> Core_Msg=$(echo $Core_Msg partition \#$pa )
> fi;
> Core_Msg=$(echo $Core_Msg for $Core_Dir.)
> fi;
> }
> ##################################################
> #####################################
>
>
> ## "titlebar_gen" generates the $name$file title bar to always be either 79
> or 80 chars total in length:
> titlebar_gen () {
> name_file="$1$2:"; name_file_length=${#name_file}
> equal_signs_line_length=$(((80-name_file_length)/2-1)); equal_signs_line=""
> for length in $(seq $equal_signs_line_length); do
> equal_signs_line='='$equal_signs_line
> done;
> echo >> $Log1;
> echo "$equal_signs_line $name_file $equal_signs_line" >> $Log1;
> echo >> $Log1;
> }
>
>
>
> echo '============================= Boot Info Summary:
> =============================='; echo
>
> ##### Search for hard drives which don't exists or have a corrupt partition
> table
> ##### All hard drives which a valid partition table are stored in
> $Hard_Drives
> for drive in $All_Hard_Drives;
> do
> size=$(fdisk -s $drive 2>>$Trash);
> if [ 0 -lt $size 2>>$Trash ];
> then
> size=$((2*size));
> Hard_Drives=$Hard_Drives" "$drive;
> HDName[$HI]=$drive;
> HDSize[$HI]=$size;
> geometry=$(fdisk -lu $drive 2>>$Trash | grep "head");
> HDHead[$HI]=$(echo $geometry | awk '{print $1}');
> HDTrack[$HI]=$(echo $geometry | awk '{print $3}');
> HDCylinder[$HI]=$(echo $geometry | awk '{print $5}');
> ###Look at the first 4 bytes of the second sector to identify type of
> partition table;
> case $(hexdump -v -s 512 -n 4 -e '"%_u"' $drive) in
> "EMBR") HDPT[$HI]="BootIt";;
> "EFI ") HDPT[$HI]="EFI";;
> *) HDPT[$HI]="MSDos";;
> esac;
> HI=$((HI+1));
>
> else
> echo -n "$(basename $drive) " >>$FakeHardDrives;
> fi;
> done;
> ############ Identify the MBR of each hard drive.
> echo "Identifying MBRs..." >&6;
> for hi in ${!hdna...@]};
> do
> drive="${HDName[$hi]}";
> Message=$(echo is installed in the MBR of $drive)
> case $(hexdump -v -n 2 -e '/1 "%x"' $drive) in ####Look at the first two
> bytes of the hard drive to identify the boot code installed in the MBR
>
> ################################ If Grub is in the MBR
> #########################
>
> eb4 offset=$(hexdump -v -s 68 -n 4 -e '"%u"' $drive);### 0x44 contains the
> offset of the next stage
> if [ "$offset" != 1 ]; ###if Grub is installed without stage1.5 files
> then
> stage2_loc $drive;
> Message=$(echo $Message and $Stage2_Msg)
> else ### if grub is installed with stage1.5 files
> Grub_String=$(hexdump -v -s 1042 -n 94 -e '"%_u"' $drive);
> Grub_Version=${Grub_String%%nul*};
> tmp='/'${Grub_String#*/};
> tmp=${tmp%%nul*};
> stage=$(echo $tmp| awk '{print $1}');
> menu=$(echo $tmp| awk '{print $2}');
> [[ "$menu" = "" ]] || stage=$(echo $stage and $menu);
> part_info=$((1045 + ${#Grub_Version}));
> pa=$(hexdump -v -s $part_info -n 1 -e '"%d"' $drive);
> part_info=$((part_info+1));
> dr=$(hexdump -v -s $part_info -n 1 -e '"%d"' $drive);
> dr=$((dr-127));
> pa=$((pa+1));
> if [ $dr = 128 ];
> then
> Message=$(echo $Message and looks on the same drive in partition \#$pa for
> $stage.)
> else
> Message=$(echo $Message and looks on boot drive \#$dr in partition \#$pa
> for $stage.)
> fi;
> fi;
> BL=Grub$Grub_Version;;
> ############################### If Grub2 is in the MBR
> #####################################
>
> eb4c) BL=Grub2;
> offset=$(hexdump -v -s 68 -n 4 -e '"%u"' $drive);### 0x44 contains the
> offset of the next stage
> if [ "$offset" != 1 ]; ###if Grub2 is installed without Core.
> then
> core_loc $drive;
> Message=$(echo $Message and $Core_Msg)
> else ### if Grub2 is installed with Core
> Grub_String=$(hexdump -v -s 1056 -n 64 -e '"%_u"' $drive);
> Core_Dir=$(echo $Grub_String | sed s/nul[^$]*//);
> pa=$(hexdump -v -s 1044 -n 1 -e '"%d"' $drive);
> dr=$(hexdump -v -s 77 -n 1 -e '"%d"' $drive);
> dr=$((dr-127));
> pa=$((pa+1));
> if [ $dr = 128 ];
> then
> Message=$(echo $Message and looks on the same drive in partition \#$pa for
> $Core_Dir.)
> else
> Message=$(echo $Message and looks on boot drive \#$dr in partition \#$pa
> for $Core_Dir.)
> fi;
> fi;;
> ##################################################
> ############################################
> 33c0) BL=Windows;;
> fa31) BL=Syslinux;;
> faeb) BL=Lilo;;
> eb04) BL=Solaris;;
> fc31) BL=Testdisk;;
> fc33) BL=Gag;;
> eb5e) BL=Grub4Dos;;
> b800) BL=Plop;;
> 33ff) BL='HP/Gateway';;
> 31c0) BL="Acer 3";;
> ebe) BL=ThinkPad;;
> fa33) BL="No boot loader";;
> fabe) BL="No boot loader?";;
> fab BL="No boot loader";;
> fceb) BL="BootIT NG";;
> #PT_Kind="BootIT";
> #PT_Location=$hi;;
> 00) BL="No boot loader";;
> *) BL="No known boot loader"
> echo "Unknown MBR on $drive" >> $Unknown_MBR;
> echo >> $Unknown_MBR;
> hexdump -v -n 512 -C $drive >> $Unknown_MBR;
> echo >> $Unknown_MBR;;
> esac;
> ##Output message at beginning of summary that gives MBR info for each
> drive:
> echo -n " => "
> echo "$BL $Message" | fold -s -w 75 | sed -e '2~1s/.*/ &/'
> HDMBR[$hi]=$BL;
> done
> echo;
> ##################################################
> ####################################
> ############# Store and Display all the partitions
> tables.##########################
> for HI in ${!hdna...@]};
> do
> drive=${HDName[$HI]};
> echo "Computing Partition Table of $drive..." >&6;
> FirstPartition[$HI]=$((PI+1));
> FP=$PI;
> PTType=${HDPT[$HI]};
> HDPT[$HI]="MSDos";
> echo "Drive: $(basename $drive ) ___________________
> __________________________________________________ ___" >>$PartitionTable;
> fdisk -lu $drive 2>>$Trash |sed '/omitting/ d'|sed '6,$ d'
> >>$PartitionTable;
> echo >>$PartitionTable;
> printf "$PTFormat" "Partition" "Boot" "Start" "End" "Size" "Id"
> "System">>$PartitionTable;
> echo >>$PartitionTable;
> ReadPT $HI 0 4 $PartitionTable "$PTFormat" "" 0;
> echo >>$PartitionTable;
> LastPartition[$HI]=$PI;
> LP=$PI;
> CheckPT ${FirstPartition[$HI]} ${LastPartition[$HI]} $PartitionTable $HI;
> echo >>$PartitionTable;
> HDPT[$HI]=$PTType;
> case $PTType in
> BootIt) FirstPartition[$HI]=$((PI+1));
> echo -n BootIT NG Partition Table detected>>$PartitionTable;
> [[ "${HDMBR[$HI]}" = "BootIT NG" ]] && echo . >>$PartitionTable || echo ,
> but does not seem to be used. >>$PartitionTable;
> echo>>$PartitionTable;
> ReadEMBR $HI $PartitionTable;
> echo >>$PartitionTable;
> if [ "${HDMBR[$HI]}" = "BootIT NG" ];
> then
> LastPartition[$HI]=$PI;
> CheckPT ${FirstPartition[$HI]} ${LastPartition[$HI]} $PartitionTable $HI;
> else
> FirstPartition[$HI]=$FP;
> fi;;
> EFI) FirstPartition[$HI]=$((PI+1));
> EFIee=$(hexdump -v -s 450 -n 1 -e '"%x"' $drive);
> echo -n GUID Partition Table detected>>$PartitionTable;
> [[ "$EFIee" = "ee" ]] && echo . >>$PartitionTable || echo ,but does not
> seem to be used. >>$PartitionTable ;
> echo >>$PartitionTable;
> ReadEFI $HI $PartitionTable;
> echo >>$PartitionTable;
> if [ "$EFIee" = "ee" ];
> then
> LastPartition[$HI]=$PI;
> CheckPT ${FirstPartition[$HI]} ${LastPartition[$HI]} $PartitionTable $HI;
> else
> FirstPartition[$HI]=$FP;
> fi;;
> esac;
> done;
>
> for hi in ${!hdna...@]}; ############Loop through all Hard Drives
> do
> drive=${HDName[$hi]}
> for (( pi = FirstPartition[$hi]; pi <= LastPartition[$hi]; pi++ )); ## And
> then loop through ###the partition on that drive
> do
> BSI="";
> BFI="";
> part_type=${TypeArray[$pi]}; #### Type of the partition according to fdisk
> start=${StartArray[$pi]};
> size=${SizeArray[$pi]};
> end=${EndArray[$pi]};
> kind=${KindArray[$pi]};
> if [[ "${HDPT[$hi]}" = "BootIt" ]];
> then
> name="${NamesArray[$pi]}";
> mountname=$(basename $drive)$pi;
> part=$(losetup -f --show -o $((start*512)) $drive)
> #### --sizelimit $((size*512)) --sizelimit seems to be a recently added
> option for losetup. Failed on Hardy
> else
> part=${NamesArray[$pi]};
> name=$(basename $part); #### Name of the partition (/dev/sda8 -> sda
>
> mountname=$name;
> fi;
> echo "Searching $name for information... " >&6;
> type=$(blkid -c /dev/null -s TYPE $part 2>$Tmp_Log); ##### type of file
> system according to blkid
> type=${type#*=\"};
> type=${type%\"*};
> FileArray[$pi]=$type;
> # part_number=${part:8}
>
> echo $name: __________________________________________________
> _______________________; echo
> mkdir "$mountname" #### Directory where the partition will be mounted.
> if [[ "${KindArray[$pi]}" = "E" && "$type" = "" ]] ; #### Check for
> extended partion.
> then
> type="Extended Partition";
> cat $Tmp_Log>>$Trash; ### Don't display the error message from blkid for
> extended partition
> else
> cat $Tmp_Log>>$Error_Log
> fi;
> echo " File system: "$type; ### Display the File System Type
>
>
> Bytes8081=$(hexdump -v -s 128 -n 2 -e '/1 "%x"' $part) #### Use bytes
> 0x80,81 to idendtify Boot sectors
> case $Bytes8081 in
> fa33|8ec0|8cd) BST="Windows XP";;
> b6d1) BST="Windows XP: Fat32";;
> 55aa) BST="Windows Vista";;
> e9d BST="Windows Vista";;
> 55cd) BST="Fat32";;
> 10f) BST="HP Recovery";;
> 3a5e) BST="Recovery:Fat 32";;
> 89e) BST="MSDOS5.0: Fat 16";;
> bd0) BST="MSWIN4.1: Fat 32";;
> 6f6e) BST="-";; #MSWIN4.1: Fat 32"
> 7cc6) BST="MSWIN4.1: Fat 32";;
> 745) BST="Vista: Fat 32";;
> 19d) BST="BSD4.4: Fat32";;
> b60 | 211 | e00) BST="Dell Utility: Fat16";;
> 8ed0) BST="DEll Recovery: Fat32";;
> 4445) BST="DEll Restore: Fat32";;
> 6974) BST="BootIt: Fat16";;
> 6f65) BST="BootIt: Fat16";;
> 7cc6) BST=Win_98;;
> 734) BST=Dos_1.0;;
> 2d5e) BST=Dos_1.1;;
> 7815) BST=Fat32;;
> 6f74) BST=Fat32;;
> 696e) BST=Fat16;;
> 6616) BST=Fat16;;
> ####### if Grub, Grub 2 or Lilo is in the boot sector, ########
> ####### investigate the embedded information ########
> 48b4) BST=Grub2;
> core_loc $part;
> BSI=$(echo $BSI Grub2 is installed in the boot sector of $name and
> $Core_Msg);;
> aa75 | 5272) BST=Grub;
> stage2_loc $part;
> BSI=$(echo $BSI Grub$Grub_Version is installed in the boot sector of $name
> and $Stage2_Msg);;
> ############# If Lilo look for map file
> ##############################################
>
> 8053) BST=LILO;
> offset=$(hexdump -v -s 32 -n 4 -e '"%u"' $part); ### 0x20-23 contains the
> offset
> ##### of /boot/map
> BSI=$(echo $BSI" "LILO is installed in boot sector of $part and looks at
> sector $offset of $drive for the \"map\" file,);
> if [ $offset -lt $size ]; ### check whether offset
> #### is on the had drive.
> then
> tmp=$(dd if=$drive skip=$offset count=1 2>>$Trash | hexdump -v -s 508 -n 4
> -e '"%_p"');
> if [[ "$tmp" = "LILO" ]];
> then
> BSI=$(echo $BSI" "and the \"map\" file was found at this location.);
> else
> BSI=$(echo $BSI" "but the \"map\" file was not found at this location.);
> fi;
> else
> BSI=$(echo $BSI" "but the \"map\" file was not found at this location.);
> fi;;
> ##################################################
> #######################################
>
> 00) sig2=$(hexdump -v -s 128 -n 2 -e '/1 "%x"' $part)
> if [ "$sig2" = 00 ]; #### If the first two bytes are zero, the boot sector
> does not contain any boot loader.
> then
> BST="-";
> else ###### Otherwise, display the boot sector, so we that we might
> identify it and add it to the list of known boot sectors.
> BST="Unknown"
> echo "Unknown BootLoader on $name" >> $Unknown_MBR;
> echo >> $Unknown_MBR;
> hexdump -n 512 -C $part >> $Unknown_MBR;
> echo >> $Unknown_MBR;
> fi;;
> *) BST="Unknown"
> echo "Unknown BootLoader on $name" >> $Unknown_MBR;
> echo >> $Unknown_MBR;
> hexdump -n 512 -C $part >> $Unknown_MBR;
> echo >> $Unknown_MBR;
> esac;
> ###################### Display the boot sector type.
> echo " Boot sector type: "$BST
>
> ####################### Investigate the Boot Parameter Block of an NTFS
> partition.
>
> if [[ "$type" = "ntfs" ]]
> then
> offset=$(hexdump -v -s 28 -n 4 -e '"%u"' $part);
> BPB_Part_Size=$(hexdump -v -s 40 -n 4 -e '"%u"' $part)
> Comp_Size=$(( (BPB_Part_Size - size)/256 ))
> SectorsPerCluster=$(hexdump -v -s 13 -n 1 -e '"%d"' $part);
> MFT_Cluster=$(hexdump -v -s 48 -n 4 -e '"%d"' $part);
> MFT_Sector=$(( MFT_Cluster * SectorsPerCluster ));
> # Track=$(hexdump -v -s 24 -n 2 -e '"%u"' $part)'' ### Number of sectors
> per track.
> # Heads=$(hexdump -v -s 26 -n 2 -e '"%u"' $part)'' ### Number of heads
> # if [[ "$Heads" != 255 || "$Track" != 63 ]]
> # then
> # BSI=$(echo $BSI" "Geometry: $Heads Heads and $Track sectors per Track.)
> # fi;
> if [[ "$MFT_Sector" -lt "$size" ]];
> then
> MFT_FILE=$(dd if=$part skip=$MFT_Sector count=1 2>>$Trash | hexdump -v -n 4
> -e '"%_u"');
> # MFT_MFT=$( dd if=$part skip=$MFT_Sector count=1 2>>$Trash| hexdump -v -e
> '4/1 "%x"' | grep "432404d046054")
>
> else
> MFT_FILE="";
> # MFT_MFT="";
> fi;
> MFT_Mirr_Cluster=$(hexdump -v -s 56 -n 4 -e '"%d"' $part);
> MFT_Mirr_Sector=$(( MFT_Mirr_Cluster * SectorsPerCluster ));
> if [[ "$MFT_Mirr_Sector" -lt "$size" ]];
> then
> MFT_Mirr_FILE=$(dd if=$part skip=$MFT_Mirr_Sector count=1 2>>$Trash |
> hexdump -v -n 4 -e '"%_u"');
>
> # MFT_Mirr_MFT=$(dd if=$part skip=$MFT_Mirr_Sector count=1 2>>$Trash
> |hexdump -v -e '4/1 "%x"' | grep "432404d046054")
> else
> MFT_Mirr_FILE="";
> # MFT_Mirr_MFT="";
> fi;
> if [[ "$offset" = "$start" && "$MFT_FILE" = "FILE" && "$MFT_Mirr_FILE" =
> "FILE" && "$Comp_Size" = "0" ]];
> then
> BSI=$(echo $BSI" "No errors found in the Boot Parameter Block.);
> else
> if [[ "$offset" != "$start" ]]
> then
> BSI=$(echo $BSI" "According to the info in the boot sector, $name starts at
> sector $offset.)
> if [[ "$offset" != "63" && "$offset" != "2048" && "offset" != "0" ||
> "$kind" != "L" ]]
> then
> BSI=$(echo $BSI" "But according to the info from fdisk, $name starts at
> sector $start.);
> fi;
> fi;
> if [[ "$MFT_FILE" != "FILE" ]];
> then
> BSI=$(echo $BSI" "The info in boot sector on the starting sector of the MFT
> is wrong.);
> echo MFT Sector of $name >> $Unknown_MBR;
> echo >> $Unknown_MBR
> dd if=$part skip=$MFT_Sector count=1 2>>$Trash| hexdump -C >>$Unknown_MBR;
> fi;
> if [[ "$MFT_Mirr_FILE" != "FILE" ]];
> then
> BSI=$(echo $BSI" "The info in the boot sector on the starting sector of the
> MFT Mirror is wrong.);
> fi;
>
> if [[ "$Comp_Size" != "0" ]];
> then
> BSI=$(echo $BSI" "According to the info in the boot sector, $name has
> $BPB_Part_Size sectors, but according to the info from fdisk, it has $size
> sectors.);
> fi;
> fi;
> fi;
>
> ######################## Investigate the Boot Parameter Block (BPB)of some
> Fat partitions
> ##### Identifies Fat Bootsectors which are used for booting.
>
> ## if [[ "$Bytes8081" = "7cc6" || "$Bytes8081" = "7815" || "$Bytes8081" =
> "B6D1" || "$Bytes8081" = "7405" || "$Bytes8081" = "6974" || "$Bytes8081" =
> "bd0" || "$Bytes8081" = "89e" ]] ;
>
> if [[ "$type" = "vfat" ]];
> then
> offset=$(hexdump -v -s 28 -n 4 -e '"%d\n"' $part); #### Starting sector the
> partition according to BPP
> BPB_Part_Size=$(hexdump -v -s 32 -n 4 -e '"%d"' $part); ### Partition Size
> in sectors accoring to BPB
> Comp_Size=$(( (BPB_Part_Size - size)/256 )) ### This number will be unequal
> to zero if the two partions size differ by more than 255 sectors.
> #Track=$(hexdump -v -s 24 -n 2 -e '"%u"' $part)'' ### Number of sectors per
> track.
> #Heads=$(hexdump -v -s 26 -n 2 -e '"%u"' $part)'' ### Number of heads
> #if [[ "$Heads" != 255 || "$Track" != 63 ]] ### Checks for an usual
> geometry.
> #then
> # BSI=$(echo $BSI" "Geometry: $Heads Heads and $Track sectors per Track.)
> ### Report unusal geometry
> #fi;
> if [[ "$offset" = "$start" && "$Comp_Size" = "0" ]]; ### Check whether
> Partitons starting sector and the Partition Size of BPB and fdisk agree.
> then
> BSI=$(echo $BSI" "No errors found in the Boot Parameter Block.); ##If they
> agreee
> else ###### if they don't agree
> if [[ "$offset" != "$start" ]] ### if partition starting sector disagree
> then
> BSI=$(echo $BSI" "According to the info in the boot sector, $name starts at
> sector $offset.) ### display the starting sector accoding to BPB
> if [[ "$offset" != "63" && "$offset" != "2048" || "$kind" != "L" ]] ###
> check whether partition is logcial partition and starting sector is a 63.
> then ### if not, display starting sector according to fdisk.
> BSI=$(echo $BSI" "But according to the info from fdisk, $name starts at
> sector $start.);
> fi; ### If not, don't display. (This is quite common occurence, and only
> matters if one tries to boot Windows from a logical partition. So I decided
> not to display a warning message in this case.
> fi;
> #### If Partition sizes from BPB and FDISK differ by more than 255 sector,
> display both sizes.
> if [[ "$Comp_Size" != "0" ]];
> then
> BSI=$(echo $BSI" "According to the info in the boot sector, $name has
> $BPB_Part_Size sectors.)
> if [[ "$BPB_Part_Size" != 0 ]];
> then
> BSI=$(echo "$BSI"." " But according to the info from the partition table ,
> it has $size sectors.);
> fi; ## Don't display warning message in the common case BPB_Part_Size=0.
> fi;
>
> fi; #### End of BPB Error if then else
> fi; ###### End of Investigation of the BPB of vfat partitions.
> ##################################################
> ##############################################
> ##### Display boot sector info
> echo -n " Boot sector info: "
> echo $BSI | fold -s -w 55 | sed -e '2~1s/.*/ &/'
>
> ####Exclude Partitions which contain no information, #########
> ##### or which we (currently) don't know how to accces. #########
> if [ "$type" != "swap" ] && [ "$type" != "Extended Partition" ] && [
> "$type" != "unknown volume type" ] && [ "$type" != "LVM2_member" ] && [
> "$type" != "linux_raid_member" ] && [ "$type" != "crypto_Luks" ] ;
> then
>
> CheckMount=$(mount| grep "$part " |sed '2,$ d');
> CheckMount=${CheckMount% type*};
> CheckMount=${CheckMount#* on };
> ### Check wether partition is already mounted
> [[ "$CheckMount" != "" ]] && mountname=$CheckMount; #### if yes,use
> existing mount point.
> if [ "$CheckMount" != "" ] || mount -t "$type" $part "$mountname"
> 2>$Mount_Error || ( [ "$type" = ntfs ] && ntfs-3g $part "$mountname"
> 2>>$Mount_Error ) ; ####### Try to mount partition
> then ############ if partition is mounted.
> #####Try to identify the Operating System (OS) by looking for files
> specific to the OS
> OS=""
> [ -e "$mountname/Windows/System32/config/BCD-Template" ] || [ -e
> "$mountname/windows/system32/config/bcd-template" ] || [ -e
> "$mountname/WINDOWS/System32/config/BCD-Template" ] ||
> [ -e "$mountname/WINDOWS/system32/config/BCD-Template" ] && OS="Windows
> Vista"
>
> [ -e "$mountname/Windows/System32/config/SecEvent.Evt" ] || [ -e
> "$mountname/WINDOWS/system32/config/SecEvent.Evt" ] || [ -e
> "$mountname/WINDOWS/system32/config/secevent.evt" ] || [ -e
> "$mountname/windows/system32/config/secevent.evt" ] && OS="Windows XP"
>
> [ -e "$mountname/etc" ] && OS=$(sed -e 's/\\. //g' -e 's/\\.//g' -e 's/^[
> \t]*//' "$mountname"/etc/issue)
>
>
>
> ##OS=$(cat /etc/lsb-release | grep "DISTRIB_DESCRIPTION"|awk -F = '{print
> $2}')
>
> #################################### search for the files in $Bootfiles
> ########################
> ###################################### and if found, display there
> contained ########################
> BootFiles=""
> for file in $Boot_Files;
> do
> if [ -f "$mountname"$file ];
> then BootFiles=$(echo $BootFiles" "$file);
> if ! [ -h "$mountname"$file ]; ### check whether file is symlink
> then
> titlebar_gen "$name" $file; ##generates a titlebar above each file/dir
> listed
> cat "$mountname"$file >> $Log1; ### if not a symlink, display content.
> fi;
> fi;
> done;
> ################# Search for Wubi and if found display fstab
> ###################################
>
> if [ -f "$mountname""/ubuntu/disks/root.disk" ];
> then
> if mount -o loop "$mountname""/ubuntu/disks/root.disk" $Wubi;
> then
> titlebar_gen "$name" Wubi;
> echo -n "Operating System: " >>$Log1;
> [ -e "$Wubi/etc/lsb-release" ] && cat $Wubi/etc/lsb-release | grep
> "DISTRIB_DESCRIPTION"|awk -F = '{print $2}' >>$Log1
> if [ -f "$Wubi/etc/fstab" ];
> then
> echo >>$Log1;
> cat "$Wubi/etc/fstab" >> $Log1;
> else
> echo "/etc/fstab was not found" >> $Log1;
> fi;
> else
> titlebar_gen "$name" " Wubi";
> echo ubuntu/boot/root.disk was found, but could not be mounted >> $Log1;
> fi;
> umount "$Wubi" || umount -l "$Wubi";
> fi;
>
> #################################### Search for the programs in $Boot_Prog,
> ###############
> ################################### if found disply where names.
> ###############
>
> for file in $Boot_Prog;
> do
> if [ -f "$mountname"$file ];
> then BootFiles=$(echo $BootFiles" "$file);
> fi;
> done;
>
>
> ################### Search for the directories related to Booting
> ########################
> ##################, if found display the list of files
> #######################
>
> # for file in $Boot_Dir; #directories in that directory.
> # do
> # if [ -d "$mountname"$file ];
> # then
> # BootFiles=$(echo $BootFiles" "$file);
> # titlebar_gen "$name" $file ##generates a titlebar above each file/dir
> listed
> # ls -la "$mountname"$file >> $Log1 ;
> #
> # fi;
> # done;
>
> #################### Search for files containing boot codes
> #################################
>
> for file in $Boot_Codes_Dir ##### loop through all directories which might
> conatin boot_code files
> do
> if [ -d "$mountname"$file ]; ##### if such directory exits
> then
> for loader in $( ls "$mountname"$file ); ##### look at the content of that
> directory
> do
> if [ -f "$mountname$file$loader" ]; #### it its a file
> then
> sig=$(hexdump -v -s 257 -n 8 -e '8/1 "%_p"' "$mountname"$file$loader);
> if [ "$sig" = "BootPart" ] ##### Bootpart code has "BootPart" written
> at0x101
> then
> offset=$(hexdump -v -s 241 -n 4 -e '"%d"' "$mountname"$file$loader);
> dr=$(hexdump -v -s 111 -n 1 -e '"%d"' "$mountname"$file$loader);
> dr=$((dr -127))
> BFI=$(echo $BFI " "BootPart in the file $file$loader is trying to chain
> load sector \#$offset on boot drive \#$dr);
> fi;
> sig=$(hexdump -v -s 383 -n 4 -e '4/1 "%_p"' "$mountname"$file$loader);
> if [ "$sig" = "GRUB" ]; ##### Grub and Grub2 have "Grub" written at 0x17f
> then
> sig2=$(hexdump -v -n 2 -e '/1 "%x"' "$mountname"$file$loader);
> if [[ "$sig2" = "eb48" ]] ### distinguish Grub and Grub 2 by the
> ##### first two bytes.
> then
> stage2_loc "$mountname"$file$loader;
> BFI=$(echo $BFI" "Grub$Grub_Version in the file $file$loader $Stage2_Msg);
> else
> core_loc "$mountname"$file$loader;
> BFI=$(echo $BFI" "Grub2 in the file $file$loader $Core_Msg);
> fi;
> fi;
>
> fi;
> done; ## End of loop through the files in a particular Boot_Code_Directory
> fi;
> done ## End of the loop through the Boot_Code_Directories.
>
> ######### Determine the end point of all files in the GrubError18_Files
> list
>
> echo >$Tmp_Log;
> counter=0;
> cd "$mountname";
> for file in $(ls $GrubError18_Files 2>>$Trash);
> do
> if [[ -f $file ]]
> then
> BlockSize=$(filefrag -v $file| grep "Blocksize" |awk '{print $6}');
> LastBlock=$(filefrag -v $file| grep "Last block" |awk '{print $3}');
> EndGB=$(echo $(((BlockSize*LastBlock + 512*start)/100000000 ))|sed
> 's/\(.\)$/\.\1/')
> printf "%6sGB: %-s\n" $EndGB "$file" >>$Tmp_Log;
> ((counter++));
> fi;
> done;
> cd $Folder;
> if [ $counter != 0 ];
> then
> titlebar_gen "$name" ": Location of files loaded by Grub";
> cat $Tmp_Log>>$Log1;
> fi;
> echo >$Tmp_Log;
>
> if [[ $BFI != "" ]];
> then
> echo -n " Boot file info: "
> echo $BFI | fold -s -w 55 | sed -e '2~1s/.*/ &/'
> fi;
> echo " Operating System: "$OS | fold -s -w 55 | sed -e '2~1s/.*/ &/'
> echo -n " Boot files/dirs: "
> echo $BootFiles | fold -s -w 55 | sed -e '2~1s/.*/ &/'
>
> if [ "$CheckMount" = "" ]; ## if partition was mounted by the script
> then
> umount "$mountname" || umount -l "$mountname";
> fi;
> else ############### if partition failed to mount
> echo " Mounting failed:";
> cat $Mount_Error;
> fi; ### end of Mounting "if then else"
> fi; ### end of Partition Type "if then else"
> echo;
> [[ "${HDPT[$hi]}" = "BootIt" ]] && losetup -d $part;
> done; ### end of partition loop
> done; ### end of hard drive loop
>
>
>
> echo '=========================== Drive/Partition Info:
> ============================='; echo
>
> [ -e $PartitionTable ] && cat $PartitionTable || echo no valid partition
> table found ;
>
> echo "blkid -c /dev/null:
> __________________________________________________ __________";
> echo; blkid -c /dev/null
> echo;
> echo '=============================== "mount" output:
> ===============================';
> echo;
> mount;
> echo;
>
> ################# Write the content of Log1 to the RESULTS file
> [ -e $Log1 ] && cat $Log1;
>
> if [ -e $Unknown_MBR ];
> then
> echo "=========================== Unknown MBRs/Boot Sectors/etc
> =======================";
> echo;
> cat $Unknown_MBR;
> echo;
> fi;
>
> if [ -e $FakeHardDrives ];
> then
> echo "=======Devices which don't seem to have a corresponding hard
> drive==============";
> echo;
> cat $FakeHardDrives;
> echo;
> fi;
>
>
> ##################### Write the Error Log to the RESULT file
> if [ -s $Error_Log ];
> then
> echo "=============================== StdErr Messages:
> ===============================";
> echo;
> cat $Error_Log;
> fi;
>
> ##### Make the user the owner of Result file
> chown $(basename ~) $LogFile;
>
> ####### Reset the Standard Output to the Terminal
> exec 1>&-;
> exec 1>&6;
> exec 6>&-;
>
> echo Finished. The results are in the file $(basename $LogFile) located in
> $Dir;
> exit
>


-- 
Regards,

J.Francis

-- 
Ubuntu freezes on Startup
https://bugs.launchpad.net/bugs/382069
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to