Magellan Linux

Log of /tags/grubby-8_7/grubby.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 1740 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:03:37 2012 UTC (12 years, 1 month ago) by niro
File length: 102496 byte(s)
Diff to previous 1736
tagged 'grubby-8_7'

Revision 1736 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 01:02:17 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 102496 byte(s)
Diff to previous 1727
grubby: Add --debug option to annotate "suitable template" failures

Today, when grubby fails with "no suitable template found" the user
has no idea why that might be.  These can fail for several reasons.
So add a --debug option to print out the line in grubby.c where it
failed, a text message describing the failure, and a copy of the
bootloader entry that failed, to aid investigation.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>



Revision 1727 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:57:49 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100892 byte(s)
Diff to previous 1722
Use dummy entries for text following kernel entries so it is preserved 
(#744717)

Signed-off-by: Adam Williamson <awilliam@redhat.com>



Revision 1722 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:53:14 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100861 byte(s)
Diff to previous 1721
Update "echo 'Loading..." messages to the new kernel version

grub2-mkconfig will create lines like:
		echo    'Loading Linux 3.1.0-0.rc6.git0.0.fc16.x86_64 
...'
- depending on the content of /etc/default/grub.

grubby would recognize these lines and replace them with lines with the 
right
version number such as:
	echo 'Loading Fedora (3.1.0-0.rc6.git0.0.fc16.x86_64)'

these lines were however not recognized by grubby and would not be 
updated on
next kernel update when this entry would be used as template.

With this patch grubby will no longer look for a specific title but 
patch any
"echo 'Loading" line immediately before the kernel line.

Signed-off-by: Adam Williamson <awilliam@redhat.com>



Revision 1721 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:52:28 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 100790 byte(s)
Diff to previous 1720
Add new '--default-title' feature.

This displays the title of the default entry directly from the
parsed configuration file.

Signed-off-by: Cleber Rosa <crosa@redhat.com>




Revision 1720 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:51:28 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 99504 byte(s)
Diff to previous 1718
Add new '--default-index' feature.

This displays the (numeric) index of the default entry directly
from the parsed configuration file.

Signed-off-by: Cleber Rosa <crosa@redhat.com>




Revision 1718 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:49:41 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 99184 byte(s)
Diff to previous 1717
GRUB: Fix detection by increasing offset when comparing stage1 to MBR

A couple of instructions of grub's stage1 get modified when copied to 
the
MBR (replaced by NOOPs). Check for this condition, and skip these bytes
while compare stage1 and MBR.

Signed-off-by: Cleber Rosa <crosa@redhat.com>



Revision 1717 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:47:17 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98722 byte(s)
Diff to previous 1715
    Don't crash if grubConfig not found.
    
    I trigger this crash on my system. It has syslinux and no grub.
    
    Signed-off-by: Christopher Li <kernel@chrisli.org>



Revision 1715 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:35:46 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98708 byte(s)
Diff to previous 1714
    Look for other possible grub config files
    
    Since debian and Ubuntu don't symlink /boot/grub/menu.lst
    to /etc/grub.conf, make it possible to look them over on
    this original location as well.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



Revision 1714 - (view) (download) (annotate) - [select for diffs]
Modified Sat Feb 18 00:32:14 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 98209 byte(s)
Diff to previous 1696
    Make grubby to recognize Ubuntu's spin of Grub2
    
    We are looking to use grubby as a bootloader entries
    manager for the autotest project:
    
    http://autotest.kernel.org/
    
    The project aims to cover more distros than just
    red hat based ones, so this small patch fixes the
    tool under Ubuntu. They have chosen to name grub2
    grub, in all directory references. Also, they don't
    make symlinks of grub config files on /etc. So,
    adapt the code to take into consideration this
    behavior.
    
    Changes from v1:
      * Removed nested set of {}
      * Made the return in case /etc/grub.d is found
        indented
      * Moved the dbgPrint("not found\n") statement
        before the last return. Also, put a new
        dbgPrint("found\n") if we've found a suitable
        grub2 config file ubuntu/debian style.
    
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



Revision 1696 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:46:24 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 97866 byte(s)
Diff to previous 1694
Add grub2.cfg support to grubby.



Revision 1694 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:23:07 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88534 byte(s)
Diff to previous 1693
Tweak some make options.

Some functions are only used in dbgPrintf() arguments. As such,
errors/warnings on unused functions need to be disabled.

Also, use -std=gnu99.

Also, add a debug target.



Revision 1693 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:21:08 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88513 byte(s)
Diff to previous 1692
Rename entrySeparator to entryStart.
    
Since we're actually using it to detect the start of an entry (and
specifically not the end), name this slightly better.



Revision 1692 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 17 23:14:54 2012 UTC (12 years, 1 month ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 88565 byte(s)
Diff to previous 1332
Convert configFileInfo structs to C99-style initializers.

Get rid of the old initializers where struct names were commends, in
favor of C99-style assignment, so new fields can be put at logical
places without having to change the whole file.



Revision 1332 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 3 20:32:19 2011 UTC (12 years, 9 months ago) by niro
Original Path: trunk/grubby/grubby.c
File length: 91953 byte(s)
Copied from: trunk/mkinitrd-magellan/grubby/grubby.c revision 1304
Diff to previous 1304
-forkin standalone grubby

Revision 1304 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 27 16:19:11 2011 UTC (12 years, 10 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 91953 byte(s)
Diff to previous 1177
merged with 7.0.16: upstream commit:  http://git.fedorahosted.org/git?p=grubby.git;a=commit;h=703a5b7353fc34df4401bba226736176e1c62b7e
When passing --update-kernel=ALL the --args should apply to all kernel entries, not just the first one.

Revision 1177 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 15 21:16:32 2010 UTC (13 years, 3 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 92155 byte(s)
Diff to previous 1156
-added check for return value of getuuidbydev() - resolves a segfault if the device does not exist - see rhbz#592294

Revision 1156 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 14 19:47:52 2010 UTC (13 years, 6 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 92052 byte(s)
Diff to previous 926
-merged with upstream:
-update initrd support
-better rootdev handling
-better support for uuids

Revision 926 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 13:29:38 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89031 byte(s)
Diff to previous 920
-read grub options from /etc/conf.d/grub

Revision 920 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 09:50:42 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89037 byte(s)
Diff to previous 914
-fixed grub.conf default location

Revision 914 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 28 00:16:16 2009 UTC (14 years, 5 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 89031 byte(s)
Diff to previous 532
-updated grubby to version 7.0.8 from fedory with blkid support

Revision 532 - (view) (download) (annotate) - [select for diffs]
Added Sat Sep 1 22:45:15 2007 UTC (16 years, 6 months ago) by niro
Original Path: trunk/mkinitrd-magellan/grubby/grubby.c
File length: 76002 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a