Jump to content











Photo
- - - - -

Use Shift+Enter for Safe Mode parameters

grub4dos modify menu.lst

  • Please log in to reply
No replies to this topic

#1 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 26 January 2013 - 10:28 PM

If you have linux in your grub4dos menu.lst, you often need two entries, one for normal mode and one for safe mode so that you can boot on 'difficult' hardware.

This solution allows you to just have one menu entry but you can hold down SHIFT when you hit Enter to use safe mode parameters.

For this you need the bios utility on your drive (in this case in the root of the boot drive).

You could also test for Ctrl or Alt and some other keys. Bios Int 16  ah=2 reference here 

title Run Linux\nPress SHIFT+ENTER for safe mode
/bios int=0x16 eax=0x00000200 > (md)0x300+1
cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nul
set /a n=%n% & 0x03 > nul && if %n%>=1 echo SHIFT PRESSED!
#LShift=0x01, RShift=0x02,CTRL=0x04,ALT=0x08,SCROLL=0x10,NUM=0x20,CAPS=0x40,INS=0x80
#set /a n=%n% & 0x04 > nul && if %n%>=1 echo CTRL PRESSED!
set sf=
if %n%>=1 set sf=acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper   %sf%   splash 
initrd /casper/initrd.img 







Also tagged with one or more of these keywords: grub4dos, modify menu.lst

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users